PrivilegedAction that wraps the given action, or returns the action itself if the security context does not include any non-AccessControlContext state to restore. The run method of the "wrapper" action (if any) restores the non-AccessControlContext state of the security context before invoking the run method of the wrapped action, and unrestores that state after the wrapped action's run method has completed (normally or otherwise). The value returned or exception thrown by the wrapped action's run method is propagated through the run method of the wrapper action.
@param action the action to be wrapped
@return security context-restoring action wrapping action,or action if no wrapping is necessary
@throws NullPointerException if action is null
| |
| |
| |
| |
| |
| |
| |
| |