@Override
    public void runInInboundSecurityContext(final Runnable work) {
        Subject doAsSubject = subjectManager.getInvocationSubject();
        if (doAsSubject != null) {
            final PrivilegedAction<Runnable> privEx = new PrivilegedAction<Runnable>() {
                @Override
                public Runnable run() {
                    work.run();
                    return null;
                }
            };
            AccessController.doPrivileged(new PrivilegedAction<Void>() {
                @Override
                public Void run() {
                    WSSubject.doAs(subjectManager.getInvocationSubject(), privEx);
                    return null;
                }
            });
        } else {
            work.run();
        }
    }
@ Override public void runInInboundSecurityContext ( final Runnable work ) { Subject doAsSubject = subjectManager . getInvocationSubject ( ) ; if ( doAsSubject != null ) { final PrivilegedAction < Runnable > privEx = new PrivilegedAction < Runnable > ( ) { @ Override public Runnable run ( ) { work . run ( ) ; return null ; } } ; AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { @ Override public Void run ( ) { WSSubject . doAs ( subjectManager . getInvocationSubject ( ) , privEx ) ; return null ; } } ) ; } else { work . run ( ) ; } }
{@inheritDoc}