Class Privileged
java.lang.Object
org.codehaus.commons.compiler.util.Privileged
Runs actions with the privileges of the calling code, regardless of the permissions of the code further up the
call stack.
On JVMs that provide the java.security.AccessController API, this is equivalent to AccessController.doPrivileged(PrivilegedAction). That matters on JVMs where a security manager can be installed
(Java 8 through 23). Should a future JVM no longer provide that API, the action is simply executed.
-
Method Summary
-
Method Details
-
run
Runs the given action with the privileges of the calling code.- Returns:
- The value returned by the action
-