docs: public static Object doAs(Subject subject, java.security.PrivilegedAction action, boolean setCaller) {
          SecurityManager securitymanager = System.getSecurityManager();
          if (securitymanager != null) {
              securitymanager.checkPermission(DOAS_PERM);
          }
          if (action == null) {
              throw new IllegalArgumentException("null PrivilegedAction provided");
          }
          Subject callerSubject = null;
          SubjectCookie invocationCookie = setInvocationSubject(subject);
          if (setCaller) {
              callerSubject = setCallerSubject(subject);
          }
          try {
              return Subject.doAs(subject, action);
          } catch (Throwable t) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "WSSubject.doAs(Subject, PrivilegedAction) Exception caught: " + t);
              throw new RuntimeException(t); //$A13
          } finally {
              restoreInvocationSubject(invocationCookie);
              if (setCaller) {
                  restoreCallerSubject(callerSubject);
              }
          }
      }