I want to get the difference of 2 Lists of Strings.
I found CollectionUtils does that. However I am getting a compilation warning.
Collection<String> a = new ArrayList<>();
Collection<String> b = new ArrayList<>();
Collection<String> c = CollectionUtils.subtract(a, b);
Which produces:
Type safety: The expression of type
Collection
needs unchecked conversion to conform toCollection<String>
Is there any way to use this library and not get this warning? Apart from @SupressWarnings.