Class SecurityManagerUtils
java.lang.Object
org.jboss.ws.tools.security.legacy.SecurityManagerUtils
A helper class that caches and provides status about the SecurityManager API, which is deprecated starting from
JDK17 (JEP 411), and removed on JDK 23+ (JEP 486).
It also keeps the java.security.* deprecated APIs separate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoaderHelper method to execute privileged action for getting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+static ClassLoaderdoPrivilegedGetContextClassLoader(Class<?> clazz) Helper method to execute privileged action for getting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+static Class<?> doPrivilegedLoadClass(ClassLoader cl, String name) Helper method to execute privileged action for loading a class, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+static voiddoPrivilegedSetContextClassLoader(ClassLoader classLoader) Helper method to execute privileged action for setting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+static booleanProvides access to the static boolean status flag that tells whether a SecurityManager is installed
-
Constructor Details
-
SecurityManagerUtils
public SecurityManagerUtils()
-
-
Method Details
-
isSecurityManagerAvailable
public static boolean isSecurityManagerAvailable()Provides access to the static boolean status flag that tells whether a SecurityManager is installed -
doPrivilegedGetContextClassLoader
Helper method to execute privileged action for getting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+ -
doPrivilegedGetContextClassLoader
Helper method to execute privileged action for getting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+ -
doPrivilegedSetContextClassLoader
Helper method to execute privileged action for setting context classloader, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+ -
doPrivilegedLoadClass
public static Class<?> doPrivilegedLoadClass(ClassLoader cl, String name) throws PrivilegedActionException Helper method to execute privileged action for loading a class, using FQN for deprecated/removed APIs, and avoid class loading issues on JDK 23+- Throws:
PrivilegedActionException
-