Skip to content
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

JDK 24 remove java.security.AccessController.doPrivileged part 1 #21042

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

theresa-m
Copy link
Contributor

This pull requests is the first of two prs to remove the use of java.security.AccessController.doPrivileged in JDK 24. It also removes a few cases of System.getSystemProperty and SecurityException mentions that were previously missed.

21 and 24 sanity https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/26116/
24 extended https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/47217/

Related: #20563

@JasonFengJ9 JasonFengJ9 added this to the Java 24 (0.50) milestone Jan 30, 2025
@theresa-m theresa-m force-pushed the securitymanager_4 branch 3 times, most recently from 19a0138 to a0cbf2a Compare January 31, 2025 17:30
@theresa-m theresa-m force-pushed the securitymanager_4 branch 4 times, most recently from 2eb811a to 3c32682 Compare January 31, 2025 21:13
try {
jniaaTmp = SharedSecrets.class.getDeclaredField("javaNetInetAddressAccess"); //$NON-NLS-1$
jniaaTmp.setAccessible(true);
} catch (NoSuchFieldException | SecurityException e) {
// ignore exceptions
jniaaTmp = null;
Copy link
Contributor

@keithc-ca keithc-ca Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant. The suggestion was to put this in the Java24+ catch block (after line 959), without which, Java 24+ will not compile.

This pull requests is the first of two prs to remove
the use of java.security.AccessController.doPrivileged
in JDK 24. It also removes a few cases of System.getSystemProperty
and SecurityException mentions that were previously missed.

Signed-off-by: Theresa Mammarella <[email protected]>
@keithc-ca
Copy link
Contributor

Jenkins test sanity amac jdk21,jdk24

@keithc-ca keithc-ca merged commit 337cedb into eclipse-openj9:master Feb 1, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants