question: public void test_doAsPrivileged_01 ( ) { Subject subj = new Subject ( ) ; PrivilegedAction < Object > pa = new myPrivilegedAction ( ) ; PrivilegedAction < Object > paNull = null ; AccessControlContext acc = AccessController . getContext ( ) ; try { Object obj = Subject . doAsPrivileged ( null , pa , acc ) ; } catch ( Exception e ) { fail ( "Unexpected exception: " + e ) ; } try { Object obj = Subject . doAsPrivileged ( subj , pa , acc ) ; } catch ( Exception e ) { fail ( "Unexpected exception: " + e ) ; } try { Object obj = Subject . doAsPrivileged ( subj , paNull , acc ) ; fail ( "NullPointerException wasn't thrown" ) ; } catch ( NullPointerException npe ) { } }
target:  javax.security.auth.Subject#doAsPrivileged(Subject subject, PrivilegedAction action, AccessControlContext acc)