Register / Login
Win a copy of
Murach's Python Programming
this week in the
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Subject.doAs() with complex code..
posted 6 years ago
In the javadocs it states that AccessController.doPrivileged() is called
Further in the javadocs for AccessController.doPrivileged it states...
"Be *very* careful in your use of the "privileged" construct, and always remember to make the privileged code section as small as possible."
What then are the implications for having code within the privileged construct which is not even remotely on the small side?
Specifically a large switch statement modifying several Maps.
It does feel somewhat odd passing an anonymous inner class containing a switch statement as a parameter for a method call which eats all checked exceptions. Then again I'm not familiar with Jaas.
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
Dan's Exam on Flow control
Clarification from Khalid Mughal's mock exam
Box or Unbox
Error while Running Code