Good catch!
One more iteration:
http://cr.openjdk.java.net/~vlivanov/8035186/webrev.02/

Best regards,
Vladimir Ivanov

On 5/27/14 7:07 PM, Paul Sandoz wrote:

On May 27, 2014, at 3:53 PM, Vladimir Ivanov <[email protected]> 
wrote:

Paul,

What you suggest is much cleaner. Thanks!

Updated version:
http://cr.openjdk.java.net/~vlivanov/8035186/webrev.01/


Don't you need to trap the exception? e.g.:

         try {
             Path test = Paths.get("readOnly/test");
             Files.createFile(test);
             // Running with privileged permissions; cannot test; clean up and 
return
         } catch (AccessDeniedException ade) {
             // Continue with the test
         }

Paul.

Reply via email to