system-lambda
system-lambda copied to clipboard
System::setSecurityManager has been deprecated in Java17
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
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.
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
In JEP 411 has a description of the deprecation and what these method will return past JDK 17