From 88972f1fe850ff973f7c5024dc32b0d0513161e6 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 12 May 2024 09:02:59 -0400 Subject: [PATCH] Fill ArrayList on construction --- .../collections4/multimap/AbstractMultiValuedMapTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java index 9646ee543..7ffe49be9 100644 --- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java +++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java @@ -933,8 +933,7 @@ public abstract class AbstractMultiValuedMapTest extends AbstractObjectTes @Test public void testKeysBagIterator() { final MultiValuedMap map = makeFullMap(); - final Collection col = new ArrayList<>(); - col.addAll(map.keys()); + final Collection col = new ArrayList<>(map.keys()); final Bag bag = new HashBag<>(col); final int maxK = getSampleKeySize(); for (int k = 0; k < maxK; k++) {