RFR 8024253: ThreadLocal random can use SecureRandom for the initial seed

Doug Lea dl at cs.oswego.edu
Mon Sep 16 11:32:54 UTC 2013

On 09/16/2013 05:35 AM, Alan Bateman wrote:
> On 15/09/2013 17:32, Paul Sandoz wrote:
>> Hi,
>> http://cr.openjdk.java.net/~psandoz/tl/JDK-8024253-tlr-seed/webrev/
>> Now that the hash seed functionality, which utilized ThreadLocalRandom, has
>> been removed from Hashtable and WeakHashMap we can update TLR to use the same
>> seed initialization functionality as SplittableRandom, which includes using
>> SecureRandom if the system property "java.util.secureRandomSeed" is set to true.

Thanks. This just re-instates a change we had to hold off on
in last TLR updates because of the hash seed dependency.

> Looks okay to me although it might be better to catch UHE rather than Exception.

The intent is to ignore any problem in getting hashed host name
short of a VM error. On the other hand, it is not nice to consume
any unexpected mysterious RunTimeException. A coin flip...


More information about the core-libs-dev mailing list