-
Bug
-
Resolution: Fixed
-
P2
-
19
-
b21
-
b29
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289488 | 20 | Dukebot | P2 | Resolved | Fixed | b05 |
JDK-8291369 | 19.0.2 | Raffaello Giulietti | P2 | Resolved | Fixed | b01 |
JDK-8291206 | 19.0.1 | Dukebot | P2 | Resolved | Fixed | b04 |
As per the spec : https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/Random.html#from(java.util.random.RandomGenerator)
" If the generator is an instance of Random, it is returned. Otherwise, this method returns an instance of Random that delegates all methods except setSeed to the generator."
Expectation :
Any method of RandomGenerator invocation on the returned instance of adpater method shall delegate to the supplied RandomGenerator except for setSeed.
Actual :
Not all methods of RandomGenerator are delegated
Attached a sample to demonstrate the issue.
" If the generator is an instance of Random, it is returned. Otherwise, this method returns an instance of Random that delegates all methods except setSeed to the generator."
Expectation :
Any method of RandomGenerator invocation on the returned instance of adpater method shall delegate to the supplied RandomGenerator except for setSeed.
Actual :
Not all methods of RandomGenerator are delegated
Attached a sample to demonstrate the issue.
- backported by
-
JDK-8289488 Random:from() adapter does not delegate to supplied generator in all cases
-
- Resolved
-
-
JDK-8291206 Random:from() adapter does not delegate to supplied generator in all cases
-
- Resolved
-
-
JDK-8291369 Random:from() adapter does not delegate to supplied generator in all cases
-
- Resolved
-
- relates to
-
JDK-8282928 provide adapter from RandomGenerator to Random
-
- Closed
-
(1 links to)