-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove System.getSecurityManager calls from java.base and criu #20939
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Theresa Mammarella <[email protected]>
@@ -210,7 +210,9 @@ public static void runRunnableInNotCheckpointSafeMode(Runnable run) { | |||
|
|||
@SuppressWarnings("restriction") | |||
private static Unsafe unsafe; | |||
/*[IF JAVA_SPEC_VERSION < 24]*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains other security manager-related API usages, such as AccessController.doPrivileged()
. Are they to be addressed in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I am planning to do those separately since there are also many uses.
Co-authored-by: Jason Feng <[email protected]>
f1b55d8
to
fb0ffb9
Compare
@@ -602,10 +613,12 @@ public InternalCRIUSupport setWorkDir(Path workDir) { | |||
} | |||
String dir = workDir.toAbsolutePath().toString(); | |||
|
|||
/*[IF JAVA_SPEC_VERSION < 24]*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems
openj9/jcl/src/openj9.criu/share/classes/org/eclipse/openj9/criu/CRIUSupport.java
Lines 38 to 40 in 48e4702
/*[IF JAVA_SPEC_VERSION >= 17]*/ | |
@SuppressWarnings({ "deprecation", "removal" }) | |
/*[ENDIF] JAVA_SPEC_VERSION >= 17 */ |
should be moved to this file and changed to
/*[IF (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24)]*/
@SuppressWarnings({ "deprecation", "removal" })
/*[ENDIF] (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24) */
because the deprecated System.getSecurityManager()
usages are being removed.
Remove calls to System.getSecurityManager for JDK 24 since this method is deprecated for removal and returns null. This change also removes javadoc references to SecurityException which no longer apply with the removal of System.getSecurityManager.
I have more pull requests removing SecurityException and System.getSecurityManager coming. I wanted to break this into smaller chunks for review since there are many uses in OpenJ9.
Related: #20563