Package org.eclipse.jetty.util.security
Class SecurityUtils
java.lang.Object
org.eclipse.jetty.util.security.SecurityUtils
Collections of utility methods to deal with the scheduled removal of the security classes defined by JEP 411.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckPermission(Permission permission) Checks the given permission, if thesecurity manageris set.static <T> TdoPrivileged(PrivilegedAction<T> action) Runs the given action with the calling context restricted to just the calling frame, not all the frames in the stack.static Object
-
Method Details
-
getSecurityManager
- Returns:
- the current security manager, if available
-
checkPermission
Checks the given permission, if the
security manageris set.- Parameters:
permission- the permission to check- Throws:
SecurityException- if the permission check fails
-
doPrivileged
Runs the given action with the calling context restricted to just the calling frame, not all the frames in the stack.
- Type Parameters:
T- the type of the result- Parameters:
action- the action to run- Returns:
- the result of running the action
-