system-lambda icon indicating copy to clipboard operation
system-lambda copied to clipboard

System::setSecurityManager has been deprecated in Java17

Open gilamarko opened this issue 3 years ago • 3 comments
trafficstars

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

gilamarko avatar Apr 08 '22 14:04 gilamarko

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 avatar Jan 06 '23 15:01 dkfellows

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

yeikel avatar Jul 10 '23 15:07 yeikel

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

FreedomFaighter avatar Oct 25 '23 12:10 FreedomFaighter