Blame SOURCES/rh1915071-always_initialise_configurator_access.patch

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