# HG changeset patch # User dholmes # Date 1494554764 0 # Node ID 629171363c319d8a373c9b4d3a46eeaa317728e6 # Parent 9c8ac4361d9f7af03bed04f19c12b2f99024e779# Parent f8961f9da1d4ae63634a109ac0bb2a0ebd6bf092 Merge diff -r 9c8ac4361d9f -r 629171363c31 jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java --- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java Thu May 11 18:04:24 2017 -0700 +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java Fri May 12 02:06:04 2017 +0000 @@ -49,6 +49,7 @@ import java.util.stream.LongStream; import java.util.stream.StreamSupport; import jdk.internal.misc.Unsafe; +import jdk.internal.misc.VM; /** * A random number generator isolated to the current thread. Like the @@ -1093,11 +1094,8 @@ // at end of to survive static initialization circularity static { - if (java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction<>() { - public Boolean run() { - return Boolean.getBoolean("java.util.secureRandomSeed"); - }})) { + String sec = VM.getSavedProperty("java.util.secureRandomSeed"); + if (Boolean.parseBoolean(sec)) { byte[] seedBytes = java.security.SecureRandom.getSeed(8); long s = (long)seedBytes[0] & 0xffL; for (int i = 1; i < 8; ++i)