--- jsr166/src/test/loops/DenseMapMicroBenchmark.java 2015/01/02 16:57:15 1.8 +++ jsr166/src/test/loops/DenseMapMicroBenchmark.java 2016/10/23 03:03:23 1.10 @@ -70,7 +70,6 @@ public class DenseMapMicroBenchmark { } } - static Long[] toLongs(Integer[] ints) { Long[] longs = new Long[ints.length]; for (int i = 0; i < ints.length; i++) @@ -100,7 +99,6 @@ public class DenseMapMicroBenchmark { return doubles; } - static final class Hasher extends Job { final Object[] elts; final Class mapClass; @@ -111,9 +109,9 @@ public class DenseMapMicroBenchmark { this.mapClass = mapClass; } public void work() { - Map m = null; + final Map m; try { - m = (Map) mapClass.newInstance(); + m = (Map) mapClass.getConstructor().newInstance(); } catch (Exception e) { throw new RuntimeException("Can't instantiate " + mapClass + ": " + e); }