|
26 | 26 |
|
27 | 27 | import static com.oracle.svm.core.snippets.KnownIntrinsics.readCallerStackPointer; |
28 | 28 |
|
29 | | -import java.io.File; |
30 | 29 | import java.lang.reflect.Constructor; |
31 | 30 | import java.net.URL; |
32 | 31 | import java.security.CodeSource; |
|
66 | 65 | import com.oracle.svm.util.ReflectionUtil; |
67 | 66 |
|
68 | 67 | import jdk.graal.compiler.core.common.SuppressFBWarnings; |
69 | | -import sun.security.util.Debug; |
70 | 68 | import sun.security.util.SecurityConstants; |
71 | 69 |
|
72 | 70 | /* |
@@ -133,41 +131,9 @@ final class Target_java_security_Security { |
133 | 131 | @Alias // |
134 | 132 | @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias) // |
135 | 133 | static Properties props; |
136 | | - |
137 | | - @Alias // |
138 | | - private static Properties initialSecurityProperties; |
139 | | - |
140 | | - @Alias // |
141 | | - private static Debug sdebug; |
142 | | - |
143 | | - @Substitute |
144 | | - @TargetElement(onlyWith = JDK21OrEarlier.class) |
145 | | - private static void initialize() { |
146 | | - props = SecurityProvidersSupport.singleton().getSavedInitialSecurityProperties(); |
147 | | - boolean overrideAll = false; |
148 | | - |
149 | | - if ("true".equalsIgnoreCase(props.getProperty("security.overridePropertiesFile"))) { |
150 | | - String extraPropFile = System.getProperty("java.security.properties"); |
151 | | - if (extraPropFile != null && extraPropFile.startsWith("=")) { |
152 | | - overrideAll = true; |
153 | | - extraPropFile = extraPropFile.substring(1); |
154 | | - } |
155 | | - loadProps(null, extraPropFile, overrideAll); |
156 | | - } |
157 | | - initialSecurityProperties = (Properties) props.clone(); |
158 | | - if (sdebug != null) { |
159 | | - for (String key : props.stringPropertyNames()) { |
160 | | - sdebug.println("Initial security property: " + key + "=" + props.getProperty(key)); |
161 | | - } |
162 | | - } |
163 | | - } |
164 | | - |
165 | | - @Alias |
166 | | - @TargetElement(onlyWith = JDK21OrEarlier.class) |
167 | | - private static native boolean loadProps(File masterFile, String extraPropFile, boolean overrideAll); |
168 | 134 | } |
169 | 135 |
|
170 | | -@TargetClass(value = java.security.Security.class, innerClass = "SecPropLoader", onlyWith = JDKLatest.class) |
| 136 | +@TargetClass(value = java.security.Security.class, innerClass = "SecPropLoader") |
171 | 137 | final class Target_java_security_Security_SecPropLoader { |
172 | 138 |
|
173 | 139 | @Substitute |
|
0 commit comments