Blame SOURCES/rh1915071-always_initialise_configurator_access.patch

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