(9) RFR: 8179515: Class java.util.concurrent.ThreadLocalRandom fails to Initialize when using SecurityManager

David Holmes david.holmes at oracle.com
Thu May 11 20:46:08 UTC 2017

Bug: https://bugs.openjdk.java.net/browse/JDK-8179515
webrev: http://cr.openjdk.java.net/~dholmes/8179515/webrev/

This is a fix contributed by Doug Lea, from a suggestion made by Alan 
Bateman. While I'm handling the fix process for Doug, it isn't my fix so 
I am also a Reviewer of this fix. I expect Martin to also review.

The fix is quite simple - break the dependency between ThreadLocalRandom 
and the security framework by replacing a doPrivileged block that reads 
a system property with a call to the JDK internal VM.getSavedProperty(). 
This allows TLR to be used transitively from the security framework 
without creating a cyclic initialization dependency which leads to 
failure to initialize.

This fixed is approved for 9.


More information about the core-libs-dev mailing list