-
Notifications
You must be signed in to change notification settings - Fork 114
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
Guard all the places that ant sets the security manager #1662
Conversation
- This copies the code because org.eclipse.ant.internal.launching.remote.InternalAntRunner can't see (much of) anything else define by org.eclipse.ant. eclipse-platform#1660
private static boolean isSecurityManagerAllowed() { | ||
String sm = System.getProperty("java.security.manager"); //$NON-NLS-1$ | ||
if (sm == null) { // default is 'disallow' since 18 and was 'allow' before | ||
return !JavaEnvUtils.isAtLeastJavaVersion("18"); //$NON-NLS-1$ |
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.
If we require Java 21 now it might be obsolete?!
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.
These tests are failing when running with Java 21. Just because the IDE requires Java 21 doesn't mean an ant task requires Java 21 or even the Eclipse ant bundles for that matter.
Anyway, it's a copy of this already-committed code:
Lines 86 to 95 in 9636c7e
private static final boolean IS_SECURITY_MANAGER_SUPPORTED = isSecurityManagerAllowed(); | |
private static boolean isSecurityManagerAllowed() { | |
String sm = System.getProperty("java.security.manager"); //$NON-NLS-1$ | |
if (sm == null) { // default is 'disallow' since 18 and was 'allow' before | |
return !JavaEnvUtils.isAtLeastJavaVersion("18"); //$NON-NLS-1$ | |
} | |
// Value is either 'disallow' or 'allow' or specifies the SecurityManager class to set | |
return !"disallow".equals(sm); //$NON-NLS-1$ | |
} |
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
I think we need to move forward on this to stabilize and improve the builds. If there are ways to improve these changes, with less duplication, we can do that as a follow up. |
Also remove obsolete comments. Follow-up on eclipse-platform#1662
Thanks for this! And for the follow-up, please have a look at: |
#1660