1051 static final String BAD_RANGE = "bound must be greater than origin"; |
1051 static final String BAD_RANGE = "bound must be greater than origin"; |
1052 static final String BAD_SIZE = "size must be non-negative"; |
1052 static final String BAD_SIZE = "size must be non-negative"; |
1053 |
1053 |
1054 // Unsafe mechanics |
1054 // Unsafe mechanics |
1055 private static final Unsafe U = Unsafe.getUnsafe(); |
1055 private static final Unsafe U = Unsafe.getUnsafe(); |
1056 private static final long SEED = U.objectFieldOffset |
1056 private static final long SEED |
1057 (Thread.class, "threadLocalRandomSeed"); |
1057 = U.objectFieldOffset(Thread.class, "threadLocalRandomSeed"); |
1058 private static final long PROBE = U.objectFieldOffset |
1058 private static final long PROBE |
1059 (Thread.class, "threadLocalRandomProbe"); |
1059 = U.objectFieldOffset(Thread.class, "threadLocalRandomProbe"); |
1060 private static final long SECONDARY = U.objectFieldOffset |
1060 private static final long SECONDARY |
1061 (Thread.class, "threadLocalRandomSecondarySeed"); |
1061 = U.objectFieldOffset(Thread.class, "threadLocalRandomSecondarySeed"); |
1062 private static final long THREADLOCALS = U.objectFieldOffset |
1062 private static final long THREADLOCALS |
1063 (Thread.class, "threadLocals"); |
1063 = U.objectFieldOffset(Thread.class, "threadLocals"); |
1064 private static final long INHERITABLETHREADLOCALS = U.objectFieldOffset |
1064 private static final long INHERITABLETHREADLOCALS |
1065 (Thread.class, "inheritableThreadLocals"); |
1065 = U.objectFieldOffset(Thread.class, "inheritableThreadLocals"); |
1066 private static final long INHERITEDACCESSCONTROLCONTEXT = U.objectFieldOffset |
1066 private static final long INHERITEDACCESSCONTROLCONTEXT |
1067 (Thread.class, "inheritedAccessControlContext"); |
1067 = U.objectFieldOffset(Thread.class, "inheritedAccessControlContext"); |
1068 |
1068 |
1069 /** Rarely-used holder for the second of a pair of Gaussians */ |
1069 /** Rarely-used holder for the second of a pair of Gaussians */ |
1070 private static final ThreadLocal<Double> nextLocalGaussian = |
1070 private static final ThreadLocal<Double> nextLocalGaussian = |
1071 new ThreadLocal<>(); |
1071 new ThreadLocal<>(); |
1072 |
1072 |