--- jsr166/src/test/tck/ThreadLocalRandomTest.java 2017/10/13 02:34:59 1.27 +++ jsr166/src/test/tck/ThreadLocalRandomTest.java 2018/01/28 16:41:13 1.29 @@ -63,8 +63,7 @@ public class ThreadLocalRandomTest exten ThreadLocalRandom rnd = ThreadLocalRandom.current(); final java.lang.reflect.Method m; try { - m = ThreadLocalRandom.class.getDeclaredMethod( - "next", new Class[] { int.class }); + m = ThreadLocalRandom.class.getDeclaredMethod("next", int.class); m.setAccessible(true); } catch (SecurityException acceptable) { // Security manager may deny access @@ -355,7 +354,7 @@ public class ThreadLocalRandomTest exten // Don't use main thread's ThreadLocalRandom - it is likely to // be polluted by previous tests. final AtomicReference threadLocalRandom = - new AtomicReference(); + new AtomicReference<>(); final AtomicLong rand = new AtomicLong(); long firstRand = 0;