Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.2
-
None
Description
DGM's retainAll() has this signature:
public static <T> boolean retainAll(Collection<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> condition)
The condition closure is expected to return a boolean or a boolean-ish value, but not the same type as the Collection.
removeAll() has the correct signature that doesn't specify a return type on the closure:
public static <T> boolean removeAll(Collection<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition)
retainAll() still works, but IDEA's syntax highlighting complains when passing in a Closure<Boolean> to retainAll() on a List of other objects.