src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
branchJDK-8193209-branch
changeset 57437 f02ffcb61dce
parent 57388 b1e6bc96af3d
child 57547 56cbdc3ea079
--- a/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Thu Jun 27 18:02:51 2019 -0300
+++ b/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Thu Jun 27 18:30:27 2019 -0300
@@ -33,7 +33,7 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Additional modifications by Guy Steele in 2019 to refactor the code
- * and to implement the {@code Rng} interface.
+ * and to implement the {@link RandomNumberGenerator} interface.
  */
 
 package java.util.concurrent;
@@ -41,10 +41,10 @@
 import java.io.ObjectStreamField;
 import java.security.AccessControlContext;
 import java.util.Random;
-import java.util.RngSupport;
 import java.util.Spliterator;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.random.RNGSupport;
 import jdk.internal.misc.Unsafe;
 import jdk.internal.misc.VM;
 
@@ -123,7 +123,7 @@
      * This implementation of ThreadLocalRandom overrides the
      * definition of the nextGaussian() method in the class Random,
      * and instead uses the ziggurat-based algorithm that is the
-     * default for the Rng interface.
+     * default for the RandomNumberGenerator interface.
      */
 
     private static int mix32(long z) {
@@ -152,7 +152,7 @@
     static final void localInit() {
         int p = probeGenerator.addAndGet(PROBE_INCREMENT);
         int probe = (p == 0) ? 1 : p; // skip 0
-        long seed = RngSupport.mixMurmur64(seeder.getAndAdd(SEEDER_INCREMENT));
+        long seed = RNGSupport.mixMurmur64(seeder.getAndAdd(SEEDER_INCREMENT));
         Thread t = Thread.currentThread();
         U.putLong(t, SEED, seed);
         U.putInt(t, PROBE, probe);
@@ -216,7 +216,7 @@
      * @return a pseudorandom {@code long} value
      */
     public long nextLong() {
-        return RngSupport.mixMurmur64(nextSeed());
+        return RNGSupport.mixMurmur64(nextSeed());
     }
 
     // Within-package utilities
@@ -375,8 +375,8 @@
      * The next seed for default constructors.
      */
     private static final AtomicLong seeder
-        = new AtomicLong(RngSupport.mixMurmur64(System.currentTimeMillis()) ^
-                         RngSupport.mixMurmur64(System.nanoTime()));
+        = new AtomicLong(RNGSupport.mixMurmur64(System.currentTimeMillis()) ^
+                         RNGSupport.mixMurmur64(System.nanoTime()));
 
     // at end of <clinit> to survive static initialization circularity
     static {