8150014: java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java fails with NoClassDefFoundError
authordl
Sat, 20 Feb 2016 12:19:36 -0800
changeset 36015 c263d0e3b073
parent 36014 3d50784f2dc2
child 36016 e1580bae8eb5
8150014: java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java fails with NoClassDefFoundError Reviewed-by: martin, psandoz, darcy, mhaupt, dholmes
jdk/src/java.base/share/classes/java/util/SplittableRandom.java
jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
--- 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)