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

System::setSecurityManager has been deprecated in Java17 #27

Open
gilamarko opened this issue Apr 8, 2022 · 3 comments
Open

System::setSecurityManager has been deprecated in Java17 #27

gilamarko opened this issue Apr 8, 2022 · 3 comments

Comments

@gilamarko
Copy link

Running UT with java17 showed that warning

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by com.github.stefanbirkner.systemlambda.SystemLambda 

Just reporting the issue

@dkfellows
Copy link

See the relevant 🐞 JDK-8199704 which appears to be where the tracking of a replacement for that API is, noting that blocking System::exit is a key use case preventing removal of SecurityManager.

dkfellows added a commit to SpiNNakerManchester/JavaSpiNNaker that referenced this issue Jan 6, 2023
It's not *properly* testing anything, but it does check that things are
not totally silly.

Note that this code is currently unavoidably impacted by:
* stefanbirkner/system-lambda#27
* https://bugs.openjdk.org/browse/JDK-8199704
@yeikel
Copy link

yeikel commented Jul 10, 2023

Note that this is no longer a warning

Now it is an error

[ERROR] Errors:
[ERROR] test:194 » UnsupportedOperation The Security Manager is deprecated and will be removed in a future release

The only workaround I am aware of so far is to add -Djava.security.manager=allow to the JVm arguments

@FreedomFaighter
Copy link

In JEP 411 has a description of the deprecation and what these method will return past JDK 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants