code: 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;
              }
          });
      }
docs: Removes the run as identity
  
  @return the identity removed