--- a/test/jdk/java/util/Map/LockStep.java Mon Jun 25 09:59:16 2018 -0700
+++ b/test/jdk/java/util/Map/LockStep.java Mon Jun 25 09:59:16 2018 -0700
@@ -28,7 +28,6 @@
* @key randomness
*/
-import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
@@ -104,23 +103,21 @@
final Random r = new Random();
for (int i = 0; i < iterations; i++) {
- List<Map> maps = Arrays.asList(
- new Map[] {
- new IdentityHashMap(11),
- new HashMap(16),
- new LinkedHashMap(16),
- new WeakHashMap(16),
- new Hashtable(16),
- new TreeMap(),
- new ConcurrentHashMap(16),
- new ConcurrentSkipListMap(),
- Collections.checkedMap(new HashMap(16), Integer.class, Integer.class),
- Collections.checkedSortedMap(new TreeMap(), Integer.class, Integer.class),
- Collections.checkedNavigableMap(new TreeMap(), Integer.class, Integer.class),
- Collections.synchronizedMap(new HashMap(16)),
- Collections.synchronizedSortedMap(new TreeMap()),
- Collections.synchronizedNavigableMap(new TreeMap())
- });
+ List<Map> maps = List.of(
+ new IdentityHashMap(11),
+ new HashMap(16),
+ new LinkedHashMap(16),
+ new WeakHashMap(16),
+ new Hashtable(16),
+ new TreeMap(),
+ new ConcurrentHashMap(16),
+ new ConcurrentSkipListMap(),
+ Collections.checkedMap(new HashMap(16), Integer.class, Integer.class),
+ Collections.checkedSortedMap(new TreeMap(), Integer.class, Integer.class),
+ Collections.checkedNavigableMap(new TreeMap(), Integer.class, Integer.class),
+ Collections.synchronizedMap(new HashMap(16)),
+ Collections.synchronizedSortedMap(new TreeMap()),
+ Collections.synchronizedNavigableMap(new TreeMap()));
for (int j = 0; j < 10; j++)
put(maps, r.nextInt(100), r.nextInt(100));