--- jsr166/src/test/loops/MapWordLoops.java 2015/01/15 18:34:19 1.11 +++ jsr166/src/test/loops/MapWordLoops.java 2016/10/23 03:03:23 1.13 @@ -39,7 +39,6 @@ public class MapWordLoops { for (int s = WORDS_FILES.length-1; s >= 0; --s) tests(mapClass, numTests, s); - } static void tests(Class mapClass, int numTests, int sizeIndex) { @@ -67,8 +66,7 @@ public class MapWordLoops { static Map newMap(Class cl) { try { - Map m = (Map)cl.newInstance(); - return m; + return (Map) cl.getConstructor().newInstance(); } catch (Exception e) { throw new RuntimeException("Can't instantiate " + cl + ": " + e); }