Request for review: 7190897 (fs) Files.isWritable method returns false when the path is writable (win). (original) (raw)

Alan Bateman Alan.Bateman at oracle.com
Thu Feb 28 14:31:38 UTC 2013


On 28/02/2013 11:54, Alexey Utkin wrote:

:

The suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-7190897/webrev.00/ Thanks for sorting this out, this code should have used AccessCheck in the original implementation. A couple of comments:

Did you consider having AccessCheckForFile take a parameter for the mapping so that it wouldn't be file-specific (and so could be renamed to AccessCheck)?

checkFileAccess ignores the exception from AccessCheck whereas I should it should be translated to an IOException.

Otherwise I think this is good. You don't have a test case but I can't think how this could be tested anyway as we already have tests for checkAccess and isWritable.

-Alan.



More information about the core-libs-dev mailing list