--- jsr166/src/test/loops/StringMapLoops.java 2015/09/14 16:47:43 1.13 +++ jsr166/src/test/loops/StringMapLoops.java 2016/10/23 03:03:24 1.15 @@ -102,7 +102,8 @@ public class StringMapLoops { static void test(int i, int nkeys, String[] key, Class mapClass) throws Exception { System.out.print("Threads: " + i + "\t:"); - Map map = (Map)mapClass.newInstance(); + Map map = + (Map) mapClass.getConstructor().newInstance(); // Uncomment to start with a non-empty table // for (int j = 0; j < nkeys; j += 4) // start 1/4 occupied // map.put(key[j], key[j]); @@ -217,6 +218,6 @@ public class StringMapLoops { // fill up remaining keys with path-like compounds of previous pairs int j = 0; while (k < n) - keys[k++] = (String) keys[j++] + "/" + (String) keys[j]; + keys[k++] = keys[j++] + "/" + keys[j]; } }