Fill ArrayList on construction

This commit is contained in:
Gary Gregory 2024-05-12 09:02:59 -04:00
parent a650099315
commit 88972f1fe8
1 changed files with 1 additions and 2 deletions

View File

@ -933,8 +933,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
@Test
public void testKeysBagIterator() {
final MultiValuedMap<K, V> map = makeFullMap();
final Collection<K> col = new ArrayList<>();
col.addAll(map.keys());
final Collection<K> col = new ArrayList<>(map.keys());
final Bag<K> bag = new HashBag<>(col);
final int maxK = getSampleKeySize();
for (int k = 0; k < maxK; k++) {