8150014: java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java fails with NoClassDefFoundError
Reviewed-by: martin, psandoz, darcy, mhaupt, dholmes
--- a/jdk/src/java.base/share/classes/java/util/SplittableRandom.java Fri Feb 19 09:55:37 2016 -0800
+++ b/jdk/src/java.base/share/classes/java/util/SplittableRandom.java Sat Feb 20 12:19:36 2016 -0800
@@ -225,9 +225,11 @@
private static final AtomicLong defaultGen = new AtomicLong(initialSeed());
private static long initialSeed() {
- java.security.PrivilegedAction<Boolean> action =
- () -> Boolean.getBoolean("java.util.secureRandomSeed");
- if (java.security.AccessController.doPrivileged(action)) {
+ if (java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Boolean>() {
+ public Boolean run() {
+ return Boolean.getBoolean("java.util.secureRandomSeed");
+ }})) {
byte[] seedBytes = java.security.SecureRandom.getSeed(8);
long s = (long)seedBytes[0] & 0xffL;
for (int i = 1; i < 8; ++i)
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java Fri Feb 19 09:55:37 2016 -0800
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java Sat Feb 20 12:19:36 2016 -0800
@@ -134,9 +134,11 @@
private static final AtomicLong seeder = new AtomicLong(initialSeed());
private static long initialSeed() {
- java.security.PrivilegedAction<Boolean> action =
- () -> Boolean.getBoolean("java.util.secureRandomSeed");
- if (java.security.AccessController.doPrivileged(action)) {
+ if (java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Boolean>() {
+ public Boolean run() {
+ return Boolean.getBoolean("java.util.secureRandomSeed");
+ }})) {
byte[] seedBytes = java.security.SecureRandom.getSeed(8);
long s = (long)seedBytes[0] & 0xffL;
for (int i = 1; i < 8; ++i)