Need reviewer for 6876541: (file) Files.walkFileTree(...): no SecurityException if read access to the starting file is denied
Alan.Bateman at Sun.COM
Mon Sep 14 06:52:45 PDT 2009
Christopher Hegarty -Sun Microsystems Ireland wrote:
> 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.
Thanks for reviewing.
We could split this test into 3 if you think its worth it. For now, it
needs to be run by jtreg and will be run 3 times, each with a different
policy. To keep it simple it attempts to walk test.src (an alternative
would have been to create a file tree, perhaps in the tmp dir and
corresponding policy files). As the default policy grants reads access
to the current directory then it would otherwise cause the "denyAll" and
"grantTopOnly" tests to fail.
More information about the nio-dev