--- jsr166/src/main/java/util/SplittableRandom.java 2016/11/13 03:36:50 1.36 +++ jsr166/src/main/java/util/SplittableRandom.java 2017/02/20 22:07:50 1.39 @@ -375,7 +375,7 @@ public final class SplittableRandom { * may, and typically does, vary across program invocations. */ public SplittableRandom() { // emulate defaultGen.split() - long s = defaultGen.getAndAdd(2 * GOLDEN_GAMMA); + long s = defaultGen.getAndAdd(GOLDEN_GAMMA << 1); this.seed = mix64(s); this.gamma = mixGamma(s + GOLDEN_GAMMA); } @@ -531,19 +531,6 @@ public final class SplittableRandom { } /** - * Generates a pseudorandom number with the indicated number of - * low-order bits. Because this class has no subclasses, this - * method cannot be invoked or overridden. - * - * @param bits random bits - * @return the next pseudorandom value from this random number - * generator's sequence - */ - protected int next(int bits) { - return nextInt() >>> (32 - bits); - } - - /** * Returns a pseudorandom {@code double} value between the specified * origin (inclusive) and bound (exclusive). * @@ -792,8 +779,7 @@ public final class SplittableRandom { * @return a stream of pseudorandom {@code double} values, * each with the given origin (inclusive) and bound (exclusive) * @throws IllegalArgumentException if {@code streamSize} is - * less than zero - * @throws IllegalArgumentException if {@code randomNumberOrigin} + * less than zero, or {@code randomNumberOrigin} * is greater than or equal to {@code randomNumberBound} */ public DoubleStream doubles(long streamSize, double randomNumberOrigin,