-
Bug
-
Resolution: Fixed
-
P2
-
19
-
b08
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8281882 | 18.0.2 | Joe Darcy | P2 | Resolved | Fixed | b01 |
JDK-8281557 | 18.0.1 | Joe Darcy | P2 | Closed | Fixed | b07 |
JDK-8285788 | 17.0.5-oracle | Ravi Reddy | P2 | Closed | Fixed | b01 |
JDK-8288061 | 17.0.5 | Goetz Lindenmaier | P2 | Resolved | Fixed | b01 |
JDK-8293062 | 11.0.18-oracle | Ryan Wallace | P2 | Closed | Fixed | b04 |
JDK-8296314 | 11.0.18 | Goetz Lindenmaier | P2 | Resolved | Fixed | b02 |
JDK-8293063 | 8u361 | Ryan Wallace | P2 | Closed | Fixed | b04 |
https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/random/RandomGenerator.html#nextDouble(double)
> "Implementation Requirements:
> 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)."
fails with JDK 19-pre08 bundles.
This is the test which is supplying the positive finite double and expecting the results as specified :
=============
RandomGenerator rg = new RandomGenerator() {
@Override
public double nextDouble() {
return 123456789.34d;
}
@Override
public long nextLong() {
return 0;
}
};
double value = rg.nextDouble(bound); // the "bound" used by the specific test could be any value from the list of {Double.MIN_VALUE, 10.0, 1234455555.45, 10000000d}
Assert.assertTrue(value >= 0);
Assert.assertTrue(value < bound); // fails here
==========
- backported by
-
JDK-8281882 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Resolved
-
JDK-8288061 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Resolved
-
JDK-8296314 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Resolved
-
JDK-8281557 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Closed
-
JDK-8285788 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Closed
-
JDK-8293062 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Closed
-
JDK-8293063 RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix
- Closed
- is cloned by
-
JDK-8281183 RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950
- Closed
- relates to
-
JDK-8280550 SplittableRandom#nextDouble(double,double) can return result >= bound
- Closed
- links to
-
Commit openjdk/jdk11u-dev/182173af
-
Commit openjdk/jdk17u-dev/9a4f12d5
-
Commit openjdk/jdk18u/e1dfd9fa
-
Commit openjdk/jdk/0e70d450
-
Review openjdk/jdk11u-dev/1487
-
Review openjdk/jdk17u-dev/434
-
Review openjdk/jdk18u/22
-
Review openjdk/jdk/7292