--- jsr166/src/test/tck/ConcurrentSkipListSubMapTest.java 2021/01/26 13:33:05 1.27 +++ jsr166/src/test/tck/ConcurrentSkipListSubMapTest.java 2021/01/27 01:57:24 1.28 @@ -30,7 +30,7 @@ public class ConcurrentSkipListSubMapTes * Returns a new map from Items 1-5 to Strings "A"-"E". */ private static ConcurrentNavigableMap map5() { - ConcurrentSkipListMapmap = new ConcurrentSkipListMap(); + ConcurrentSkipListMapmap = new ConcurrentSkipListMap<>(); assertTrue(map.isEmpty()); map.put(zero, "Z"); map.put(one, "A"); @@ -48,7 +48,7 @@ public class ConcurrentSkipListSubMapTes * Returns a new map from Items -5 to -1 to Strings "A"-"E". */ private static ConcurrentNavigableMap dmap5() { - ConcurrentSkipListMapmap = new ConcurrentSkipListMap(); + ConcurrentSkipListMapmap = new ConcurrentSkipListMap<>(); assertTrue(map.isEmpty()); map.put(minusOne, "A"); map.put(minusFive, "E"); @@ -61,13 +61,13 @@ public class ConcurrentSkipListSubMapTes } private static ConcurrentNavigableMap map0() { - ConcurrentSkipListMapmap = new ConcurrentSkipListMap(); + ConcurrentSkipListMapmap = new ConcurrentSkipListMap<>(); assertTrue(map.isEmpty()); return map.tailMap(one, true); } private static ConcurrentNavigableMap dmap0() { - ConcurrentSkipListMapmap = new ConcurrentSkipListMap(); + ConcurrentSkipListMapmap = new ConcurrentSkipListMap<>(); assertTrue(map.isEmpty()); return map; } @@ -226,7 +226,7 @@ public class ConcurrentSkipListSubMapTes ConcurrentNavigableMap map = map5(); Collection v = map.values(); String[] ar = v.toArray(new String[0]); - ArrayList s = new ArrayList(Arrays.asList(ar)); + ArrayList s = new ArrayList<>(Arrays.asList(ar)); mustEqual(5, ar.length); assertTrue(s.contains("A")); assertTrue(s.contains("B")); @@ -899,7 +899,7 @@ public class ConcurrentSkipListSubMapTes ConcurrentNavigableMap map = dmap5(); Collection v = map.values(); String[] ar = v.toArray(new String[0]); - ArrayList s = new ArrayList(Arrays.asList(ar)); + ArrayList s = new ArrayList<>(Arrays.asList(ar)); mustEqual(5, ar.length); assertTrue(s.contains("A")); assertTrue(s.contains("B"));