jodd-util icon indicating copy to clipboard operation
jodd-util copied to clipboard

SecurityManager is deprecated for removal

Open cushon opened this issue 1 year ago • 1 comments

The SecurityManager API is deprecated for removal, see also https://openjdk.org/jeps/486

It is used in this project for SecurityManager#getClassContext:

https://github.com/oblac/jodd-util/blob/f93798f3bfa18e9d923afab0f92a95eea0442b59/src/main/java/jodd/util/ClassUtil.java#L1142

That use-case could be migrated to java.lang.StackWalker API added in Java 9: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/StackWalker.html

cushon avatar Dec 06 '24 16:12 cushon

Please see

https://github.com/oblac/jodd-util/blob/f93798f3bfa18e9d923afab0f92a95eea0442b59/src/main/java/jodd/util/ClassUtil.java#L1156-L1189

It only uses the class when it is actually available. While it has been deprecated as of Java 17, it still is available with Java 25.

neroux avatar Nov 28 '25 00:11 neroux