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; |
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(); |
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 = |