-
Bug
-
Resolution: Fixed
-
P2
-
19
-
b09
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8281883 | 18.0.2 | Joe Darcy | P2 | Resolved | Fixed | b01 |
JDK-8281559 | 18.0.1 | Joe Darcy | P2 | Closed | Fixed | b07 |
JDK-8285876 | 17.0.5-oracle | Ravi Reddy | P2 | Closed | Fixed | b01 |
JDK-8288063 | 17.0.5 | Goetz Lindenmaier | P2 | Resolved | Fixed | b01 |
JDK-8281697 | 17.0.4-oracle | Ravi Reddy | P2 | Closed | Won't Fix | |
JDK-8281696 | 11.0.18-oracle | Ryan Wallace | P2 | Closed | Fixed | b04 |
JDK-8296316 | 11.0.18 | Goetz Lindenmaier | P2 | Resolved | Fixed | b02 |
JDK-8281698 | 8u361 | Ryan Wallace | P2 | Closed | Fixed | b04 |
=======
@TestCase
@TestedStatement(source = "nextDouble(double)", value = {"The default implementation checks that bound is a " +
"positive finite double. Then invokes nextDouble(), scaling the result so that the final result lies " +
"between 0.0 (inclusive) and bound (exclusive)."})
public void test_nextDoubleWithBoundDef1(@Doubles({Double.MIN_VALUE, 10.0, 1234455555.45, 10000000d}) double bound) {
AtomicBoolean nextDoubleInvoked = new AtomicBoolean(false);
RandomGenerator rg = new RandomGenerator() {
@Override
public double nextDouble() {
nextDoubleInvoked.set(true);
return 123456789.34d;
}
@Override
public long nextLong() {
return 0;
}
};
double value = rg.nextDouble(bound);
Assert.assertTrue(nextDoubleInvoked.get());
Assert.assertTrue(value >= 0);
Assert.assertTrue(value < bound);
}
===========
Possibly one more place to address it may be - public static double boundedNextDouble(RandomGenerator rng, double bound)
- backported by
-
JDK-8281883 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Resolved
-
JDK-8288063 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Resolved
-
JDK-8296316 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Resolved
-
JDK-8281559 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
-
JDK-8281696 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
-
JDK-8281697 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
-
JDK-8281698 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
-
JDK-8285876 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
- clones
-
JDK-8280950 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Closed
- relates to
-
JDK-8280550 SplittableRandom#nextDouble(double,double) can return result >= bound
- Closed
- links to
-
Commit openjdk/jdk11u-dev/3b40d213
-
Commit openjdk/jdk17u-dev/551b0270
-
Commit openjdk/jdk18u/6202ea57
-
Commit openjdk/jdk/0e70d450
-
Commit openjdk/jdk/77b0240d
-
Review openjdk/jdk11u-dev/1488
-
Review openjdk/jdk17u-dev/435
-
Review openjdk/jdk18u/23
-
Review openjdk/jdk/7292
-
Review openjdk/jdk/7360