This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 6d6ea087f18772b8638bb16c47994c7921054052 Author: Gary Gregory <[email protected]> AuthorDate: Wed Jun 17 19:47:59 2026 +0000 CompositeCollection#containsAll(Collection): Use stream API internally. --- .../commons/collections4/collection/CompositeCollection.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java index 094132b8c..b94f969eb 100644 --- a/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java +++ b/src/main/java/org/apache/commons/collections4/collection/CompositeCollection.java @@ -260,15 +260,7 @@ public class CompositeCollection<E> implements Collection<E>, Serializable { */ @Override public boolean containsAll(final Collection<?> coll) { - if (coll == null) { - return false; - } - for (final Object item : coll) { - if (!contains(item)) { - return false; - } - } - return true; + return coll != null && coll.stream().allMatch(this::contains); } /**
