ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/SplittableRandom.java
(Generate patch)

Comparing jsr166/src/main/java/util/SplittableRandom.java (file contents):
Revision 1.22 by dl, Fri Sep 20 09:38:07 2013 UTC vs.
Revision 1.23 by dl, Fri Sep 20 14:06:46 2013 UTC

# Line 25 | Line 25
25  
26   package java.util;
27  
28 import java.security.SecureRandom;
28   import java.net.NetworkInterface;
30 import java.util.Enumeration;
29   import java.util.concurrent.atomic.AtomicLong;
30   import java.util.function.IntConsumer;
31   import java.util.function.LongConsumer;
# Line 89 | Line 87 | import java.util.stream.DoubleStream;
87   * @author  Doug Lea
88   * @since   1.8
89   */
90 < public class SplittableRandom {
90 > public final class SplittableRandom {
91  
92      /*
93       * Implementation Overview.
# Line 242 | Line 240 | public class SplittableRandom {
240          long h = 0L;
241          try {
242              Enumeration<NetworkInterface> ifcs =
243 <                NetworkInterface.getNetworkInterfaces();
243 >                    NetworkInterface.getNetworkInterfaces();
244              boolean retry = false; // retry once if getHardwareAddress is null
245              while (ifcs.hasMoreElements()) {
246                  NetworkInterface ifc = ifcs.nextElement();
# Line 404 | Line 402 | public class SplittableRandom {
402       * may, and typically does, vary across program invocations.
403       */
404      public SplittableRandom() { // emulate defaultGen.split()
405 <        long s = defaultGen.getAndAdd(2*GOLDEN_GAMMA);
405 >        long s = defaultGen.getAndAdd(2 * GOLDEN_GAMMA);
406          this.seed = mix64(s);
407          this.gamma = mixGamma(s + GOLDEN_GAMMA);
408      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines