Blame SOURCES/rh2021263-fips_ensure_security_initialised.patch

53c576
commit 06c2decab204fcce5aca2d285953fcac1820b1ae
53c576
Author: Andrew John Hughes <andrew@openjdk.org>
53c576
Date:   Mon Jan 24 01:23:28 2022 +0000
53c576
53c576
    RH2021263: Make sure java.security.Security is initialised when retrieving JavaSecuritySystemConfiguratorAccess instance
53c576
53c576
diff --git openjdk.orig/jdk/src/share/classes/sun/misc/SharedSecrets.java openjdk/jdk/src/share/classes/sun/misc/SharedSecrets.java
53c576
index 40ca609e02..0dafe6f59c 100644
53c576
--- openjdk.orig/jdk/src/share/classes/sun/misc/SharedSecrets.java
53c576
+++ openjdk/jdk/src/share/classes/sun/misc/SharedSecrets.java
53c576
@@ -31,6 +31,7 @@ import java.io.Console;
53c576
 import java.io.FileDescriptor;
53c576
 import java.io.ObjectInputStream;
53c576
 import java.security.ProtectionDomain;
53c576
+import java.security.Security;
53c576
 import java.security.Signature;
53c576
 
53c576
 import java.security.AccessController;
53c576
@@ -255,6 +256,9 @@ public class SharedSecrets {
53c576
     }
53c576
 
53c576
     public static JavaSecuritySystemConfiguratorAccess getJavaSecuritySystemConfiguratorAccess() {
53c576
+        if (javaSecuritySystemConfiguratorAccess == null) {
53c576
+            unsafe.ensureClassInitialized(Security.class);
53c576
+        }
53c576
         return javaSecuritySystemConfiguratorAccess;
53c576
     }
53c576
 }