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 @Test
public void testKeysBagIterator() { public void testKeysBagIterator() {
final MultiValuedMap<K, V> map = makeFullMap(); final MultiValuedMap<K, V> map = makeFullMap();
final Collection<K> col = new ArrayList<>(); final Collection<K> col = new ArrayList<>(map.keys());
col.addAll(map.keys());
final Bag<K> bag = new HashBag<>(col); final Bag<K> bag = new HashBag<>(col);
final int maxK = getSampleKeySize(); final int maxK = getSampleKeySize();
for (int k = 0; k < maxK; k++) { for (int k = 0; k < maxK; k++) {