Skip to content

Commit a67d076

Browse files
committed
Use a method reference
1 parent 4dcdf5e commit a67d076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public void testRemoveIf() {
380380
two.add((E) "2");
381381
two.add((E) "1");
382382
// need separate list to remove, as otherwise one clears itself
383-
final Predicate<E> predicate = e -> "1".equals(e);
383+
final Predicate<E> predicate = "1"::equals;
384384
c.addComposited(one, two);
385385
c.removeIf(predicate);
386386
assertFalse(c.contains("1"));

0 commit comments

Comments
 (0)