public static RunAs popRunAsIdentity ( ) { return AccessController . doPrivileged ( new PrivilegedAction < RunAs > ( ) { @ Override public RunAs run ( ) { SecurityContext sc = getSecurityContext ( ) ; if ( sc == null ) throw MESSAGES . noSecurityContext ( ) ; RunAs principal = sc . getOutgoingRunAs ( ) ; sc . setOutgoingRunAs ( null ) ; return principal ; } } ) ; }
Removes the run as identity