@Override
    public Principal getCurrentPrincipal() {
        if (httpServletRequests.get() != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                if (httpServletRequests.get().getUserPrincipal() == null) {
                    Tr.debug(tc, "getCurrentPrincipal: null");
                } else {
                    Tr.debug(tc, "getCurrentPrincipal: " + httpServletRequests.get().getUserPrincipal().getName());
                }
            }
            return httpServletRequests.get().getUserPrincipal();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getCurrentPrincipal: null web context");
        }
        return null;
    }
@ Override public Principal getCurrentPrincipal ( ) { if ( httpServletRequests . get ( ) != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( httpServletRequests . get ( ) . getUserPrincipal ( ) == null ) { Tr . debug ( tc , "getCurrentPrincipal: null" ) ; } else { Tr . debug ( tc , "getCurrentPrincipal: " + httpServletRequests . get ( ) . getUserPrincipal ( ) . getName ( ) ) ; } } return httpServletRequests . get ( ) . getUserPrincipal ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getCurrentPrincipal: null web context" ) ; } return null ; }
@return Principal from HttpServletRequest or null