In the readAccess(Runnable r) method, the call to lock.lock() must occur before the try block. Also, the method name "readAccess" is confusing, because it's not acquiring a read-only mutex (multi-threading), but a read-write mutex (single threading).
How do you stop unprivileged users from using the privileged constructor, thus gaining access to the privileged API?
In the readAccess(Runnable r) method, the call to lock.lock() must occur before the try block. Also, the method name "readAccess" is confusing, because it's not acquiring a read-only mutex (multi-threading), but a read-write mutex (single threading).
How do you stop unprivileged users from using the privileged constructor, thus gaining access to the privileged API?
--Jeffrey D Smith 21:48, 25 May 2009 (CEST)