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

Paul Sandoz paul.sandoz at oracle.com
Thu May 11 21:14:36 UTC 2017


+1

Paul.

> On 11 May 2017, at 13:46, David Holmes <david.holmes at oracle.com> wrote:
> 
> 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.
> 
> Thanks,
> David



More information about the core-libs-dev mailing list