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

Comparing jsr166/src/main/java/util/concurrent/ThreadLocalRandom.java (file contents):
Revision 1.24 by dl, Mon Sep 16 23:21:43 2013 UTC vs.
Revision 1.25 by dl, Mon Oct 7 10:54:23 2013 UTC

# Line 6 | Line 6
6  
7   package java.util.concurrent;
8  
9 import java.security.SecureRandom;
10 import java.net.NetworkInterface;
9   import java.io.ObjectStreamField;
10 + import java.net.NetworkInterface;
11   import java.util.Enumeration;
12   import java.util.Random;
13   import java.util.Spliterator;
# Line 122 | Line 121 | public class ThreadLocalRandom extends R
121          long h = 0L;
122          try {
123              Enumeration<NetworkInterface> ifcs =
124 <                NetworkInterface.getNetworkInterfaces();
124 >                    NetworkInterface.getNetworkInterfaces();
125              boolean retry = false; // retry once if getHardwareAddress is null
126              while (ifcs.hasMoreElements()) {
127                  NetworkInterface ifc = ifcs.nextElement();
# Line 166 | Line 165 | public class ThreadLocalRandom extends R
165      private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
166  
167      // Constants from SplittableRandom
168 <    private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
169 <    private static final float  FLOAT_UNIT  = 1.0f / (1 << 24);
168 >    private static final double DOUBLE_UNIT = 0x1.0p-53;  // 1.0  / (1L << 53)
169 >    private static final float  FLOAT_UNIT  = 0x1.0p-24f; // 1.0f / (1 << 24)
170  
171      /** Rarely-used holder for the second of a pair of Gaussians */
172      private static final ThreadLocal<Double> nextLocalGaussian =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines