Skip to content

Commit

Permalink
Rename initSecurityManager to initPhase3
Browse files Browse the repository at this point in the history
... to match Error stack trace of openjdk
java/lang/System/SecurityManagerWarnings.java.SecurityManagerWarnings

Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Dec 9, 2024
1 parent b798307 commit 67adc10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jcl/src/java.base/share/classes/java/lang/ClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static final void initializeClassLoaders() {
/*[ENDIF] JAVA_SPEC_VERSION >= 10 */
jdk.internal.misc.VM.initLevel(2);
System.checkTmpDir();
System.initSecurityManager(applicationClassLoader);
System.initPhase3(applicationClassLoader);
jdk.internal.misc.VM.initLevel(3);
/*[ELSE] JAVA_SPEC_VERSION >= 9 */
String smvalue = System.internalGetProperties().getProperty("java.security.manager"); //$NON-NLS-1$
Expand Down
13 changes: 12 additions & 1 deletion jcl/src/java.base/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,18 @@ static void checkTmpDir() {
}

/*[IF JAVA_SPEC_VERSION >= 9]*/
static void initSecurityManager(ClassLoader applicationClassLoader) {
/**
* Initialize the security manager according
* to the java.security.manager system property.
* @param applicationClassLoader
* @throws Error
/*[IF JAVA_SPEC_VERSION >= 24]
* if the user attempts to enable the security manager
/*[ELSE] JAVA_SPEC_VERSION >= 24
* if the security manager could not be initialized
/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
static void initPhase3(ClassLoader applicationClassLoader) {
/*[IF JAVA_SPEC_VERSION >= 24]*/
boolean throwErrorOnInit = false;
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
Expand Down

0 comments on commit 67adc10

Please sign in to comment.