@Test public void testThreadLocalRandomNotPresent() throws Exception { Java6CompatibleThreadLocalRandom.threadLocalRandomPresent = false; assertNotSame(Java6CompatibleThreadLocalRandom.current(), ThreadLocalRandom.current()); assertNotNull(Java6CompatibleThreadLocalRandom.current().nextLong()); }
public static Random current() { if (threadLocalRandomPresent) { return ThreadLocalRandomAccessor.getCurrentThreadLocalRandom(); } else { return threadLocal.get(); } }
Java6CompatibleThreadLocalRandom { public static Random current() { if (threadLocalRandomPresent) { return ThreadLocalRandomAccessor.getCurrentThreadLocalRandom(); } else { return threadLocal.get(); } } }
Java6CompatibleThreadLocalRandom { public static Random current() { if (threadLocalRandomPresent) { return ThreadLocalRandomAccessor.getCurrentThreadLocalRandom(); } else { return threadLocal.get(); } } private  Java6CompatibleThreadLocalRandom(); }
Java6CompatibleThreadLocalRandom { public static Random current() { if (threadLocalRandomPresent) { return ThreadLocalRandomAccessor.getCurrentThreadLocalRandom(); } else { return threadLocal.get(); } } private  Java6CompatibleThreadLocalRandom(); static Random current(); }
Java6CompatibleThreadLocalRandom { public static Random current() { if (threadLocalRandomPresent) { return ThreadLocalRandomAccessor.getCurrentThreadLocalRandom(); } else { return threadLocal.get(); } } private  Java6CompatibleThreadLocalRandom(); static Random current();  }