Skip to content

Commit c3f02d4

Browse files
Remove substitution for Security class for JDK21.
1 parent e838abc commit c3f02d4

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/SecuritySubstitutions.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import static com.oracle.svm.core.snippets.KnownIntrinsics.readCallerStackPointer;
2828

29-
import java.io.File;
3029
import java.lang.reflect.Constructor;
3130
import java.net.URL;
3231
import java.security.CodeSource;
@@ -66,7 +65,6 @@
6665
import com.oracle.svm.util.ReflectionUtil;
6766

6867
import jdk.graal.compiler.core.common.SuppressFBWarnings;
69-
import sun.security.util.Debug;
7068
import sun.security.util.SecurityConstants;
7169

7270
/*
@@ -133,41 +131,9 @@ final class Target_java_security_Security {
133131
@Alias //
134132
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias) //
135133
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);
168134
}
169135

170-
@TargetClass(value = java.security.Security.class, innerClass = "SecPropLoader", onlyWith = JDKLatest.class)
136+
@TargetClass(value = java.security.Security.class, innerClass = "SecPropLoader")
171137
final class Target_java_security_Security_SecPropLoader {
172138

173139
@Substitute

0 commit comments

Comments
 (0)