Blame SOURCES/rh1915071-always_initialise_configurator_access.patch

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