Take 2 <was> Re: RFR 8023155: Ensure functional consistency across Random, ThreadLocalRandom, SplittableRandom

Paul Sandoz paul.sandoz at oracle.com
Tue Aug 27 19:06:45 UTC 2013



- we reverted the addition of the new next* methods on Random. The stream-based methods remain unchanged. Decided to be extra conservative, since there may be sub-classes that define such methods (not unusual e.g. just like TLR) and the contract might be different to what we specify (probably most likely around error handling but there could be other subtle issues).

- the stream-based int origin/bound support is defined using nextInt methods rather than next, which should be better when used with existing sub-classes.

- some additional tests were added for double-related origin/bounds methods of Random, ThreadLocalRandom, and SplittableRandom.

Note for TLR default constructors the seed is not yet based on the same algorithm as SplittableRandom. As discussed in a previous email we cannot do that until the hash seed functionality is removed from WeakHashMap and Hashtable.


More information about the core-libs-dev mailing list