Need reviewer for 6876541: (file) Files.walkFileTree(...): no SecurityException if read access to the starting file is denied

Christopher Hegarty -Sun Microsystems Ireland Christopher.Hegarty at Sun.COM
Mon Sep 14 01:53:30 PDT 2009

These changes look good.

I have just one minor question about the testcase. Why does it disallow 
user.dir == test.src. Will this mean that the directory has implicit 
permission or is it just catching the case where the user tries to run 
the test outside of jtreg?

The reason I ask is that in the case of failure it is sometimes useful 
to be able to run the test standalone.


Alan Bateman wrote:
> I need a reviewer for this faux pas in Files.walkFileTree. 
> SecurityException should be thrown if access to the starting file is 
> denied by the security manager. Instead, the exception is silently 
> consumed and the starting file ignored (ie: walkFileTree does nothing). 
> A secondary issue (Windows only) arises where a security manager allows 
> access to a directory but not to the all entries in that directory. Such 
> entries should be skipped but non-directory entries are still notified 
> to the FileVisitor. The webrev is here:
> Thanks,
> Alan.

More information about the nio-dev mailing list