dacapobench / dacapobench

The DaCapo benchmark suite

Home Page:https://www.dacapobench.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JDK 21 security manager deprecation

caizixian opened this issue · comments

This is one potential workaround

spotbugs/spotbugs@4c0c1b9#diff-cdbcc250a7e828934344ecdd56a28104b5bc91af8ee0f7a3a17588f0d8e46387R59

But the JavaDoc says

In the JDK implementation, if the Java virtual machine is started with the system property java.security.manager not set or set to the special token "disallow" then the setSecurityManager method cannot be used to set a security manager. See the following section of the SecurityManager class specification for more details.

Since this is deprecated anyway, perhaps an easy thing to do, is to check property java.lang.SecurityManager and JDK version, and ask users to set this on the command line for newer JDKs (>= 18 I think)