Blame SOURCES/rh1915071-always_initialise_configurator_access.patch

d1af5a
diff --git openjdk/src/java.base/share/classes/java/security/Security.java openjdk/src/java.base/share/classes/java/security/Security.java
d1af5a
index f1633afb627..ce32c939253 100644
d1af5a
--- openjdk/src/java.base/share/classes/java/security/Security.java
d1af5a
+++ openjdk/src/java.base/share/classes/java/security/Security.java
d1af5a
@@ -32,6 +32,7 @@ import java.net.URL;
d1af5a
 
d1af5a
 import jdk.internal.event.EventHelper;
d1af5a
 import jdk.internal.event.SecurityPropertyModificationEvent;
d1af5a
+import jdk.internal.access.JavaSecuritySystemConfiguratorAccess;
d1af5a
 import jdk.internal.access.SharedSecrets;
d1af5a
 import jdk.internal.util.StaticProperty;
d1af5a
 import sun.security.util.Debug;
d1af5a
@@ -74,6 +75,15 @@ public final class Security {
d1af5a
     }
d1af5a
 
d1af5a
     static {
d1af5a
+        // Initialise here as used by code with system properties disabled
d1af5a
+        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
d1af5a
+            new JavaSecuritySystemConfiguratorAccess() {
d1af5a
+                @Override
d1af5a
+                public boolean isSystemFipsEnabled() {
d1af5a
+                    return SystemConfigurator.isSystemFipsEnabled();
d1af5a
+                }
d1af5a
+            });
d1af5a
+
d1af5a
         // doPrivileged here because there are multiple
d1af5a
         // things in initialize that might require privs.
d1af5a
         // (the FileInputStream call and the File.exists call,
d1af5a
@@ -194,9 +204,8 @@ public final class Security {
d1af5a
         }
d1af5a
 
d1af5a
         String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile");
d1af5a
-        if (disableSystemProps == null &&
d1af5a
-            "true".equalsIgnoreCase(props.getProperty
d1af5a
-                ("security.useSystemPropertiesFile"))) {
d1af5a
+        if ((disableSystemProps == null || "false".equalsIgnoreCase(disableSystemProps)) &&
d1af5a
+            "true".equalsIgnoreCase(props.getProperty("security.useSystemPropertiesFile"))) {
d1af5a
             if (SystemConfigurator.configure(props)) {
d1af5a
                 loadedProps = true;
d1af5a
             }
d1af5a
diff --git openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
d1af5a
index 60fa75cab45..10b54aa4ce4 100644
d1af5a
--- openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
d1af5a
+++ openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
d1af5a
@@ -38,8 +38,6 @@ import java.util.Map.Entry;
d1af5a
 import java.util.Properties;
d1af5a
 import java.util.regex.Pattern;
d1af5a
 
d1af5a
-import jdk.internal.access.JavaSecuritySystemConfiguratorAccess;
d1af5a
-import jdk.internal.access.SharedSecrets;
d1af5a
 import sun.security.util.Debug;
d1af5a
 
d1af5a
 /**
d1af5a
@@ -65,16 +63,6 @@ final class SystemConfigurator {
d1af5a
 
d1af5a
     private static boolean systemFipsEnabled = false;
d1af5a
 
d1af5a
-    static {
d1af5a
-        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
d1af5a
-            new JavaSecuritySystemConfiguratorAccess() {
d1af5a
-                @Override
d1af5a
-                public boolean isSystemFipsEnabled() {
d1af5a
-                    return SystemConfigurator.isSystemFipsEnabled();
d1af5a
-                }
d1af5a
-            });
d1af5a
-    }
d1af5a
-
d1af5a
     /*
d1af5a
      * Invoked when java.security.Security class is initialized, if
d1af5a
      * java.security.disableSystemPropertiesFile property is not set and