GIAC
GSSP-JAVA · Question #133
Which of the following statements are true about the doAs() and doAsPrivileged() methods? Each correct answer represents a complete solution. Choose all that apply.
The correct answer is A. The doAsPrivileged() method invokes AccessController.doPrivileged by passing it the C. The doAs() method retrieves the current Thread's AccessControlContext via D. The doAsPrivileged() method, instead of retrieving the current Thread's. See the full explanation below for the reasoning.
Question
Which of the following statements are true about the doAs() and doAsPrivileged() methods? Each correct answer represents a complete solution. Choose all that apply.
Options
- AThe doAsPrivileged() method invokes AccessController.doPrivileged by passing it the
- BThe doAs() and doAsPrivileged() methods perform privileged work as a particular Subject.
- CThe doAs() method retrieves the current Thread's AccessControlContext via
- DThe doAsPrivileged() method, instead of retrieving the current Thread's
How the community answered
(44 responses)- A84% (37)
- B16% (7)
Community Discussion
No community discussion yet for this question.