Blame SOURCES/rh2021263-fips_ensure_security_initialised.patch

5f30e5
commit 4ac1a03b3ec73358988553fe9e200130847ea3b4
5f30e5
Author: Andrew Hughes <gnu.andrew@redhat.com>
5f30e5
Date:   Mon Jan 10 20:19:40 2022 +0000
5f30e5
5f30e5
    RH2021263: Make sure java.security.Security is initialised when retrieving JavaSecuritySystemConfiguratorAccess instance
5f30e5
5f30e5
diff --git openjdk.orig/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java openjdk/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
5f30e5
index 5a2c9eb0c46..a1ee182d913 100644
5f30e5
--- openjdk.orig/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
5f30e5
+++ openjdk/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
5f30e5
@@ -39,6 +39,7 @@ import java.io.FilePermission;
5f30e5
 import java.io.ObjectInputStream;
5f30e5
 import java.io.RandomAccessFile;
5f30e5
 import java.security.ProtectionDomain;
5f30e5
+import java.security.Security;
5f30e5
 import java.security.Signature;
5f30e5
 
5f30e5
 /** A repository of "shared secrets", which are a mechanism for
5f30e5
@@ -449,6 +450,9 @@ public class SharedSecrets {
5f30e5
     }
5f30e5
 
5f30e5
     public static JavaSecuritySystemConfiguratorAccess getJavaSecuritySystemConfiguratorAccess() {
5f30e5
+        if (javaSecuritySystemConfiguratorAccess == null) {
5f30e5
+            ensureClassInitialized(Security.class);
5f30e5
+        }
5f30e5
         return javaSecuritySystemConfiguratorAccess;
5f30e5
     }
5f30e5
 }