RFR: JDK-8232092 (fs) Files::isWritable returns false on a writeable root directory (win)

Alan Bateman alanb at openjdk.java.net
Thu Sep 24 09:52:35 UTC 2020


On Mon, 21 Sep 2020 19:30:44 GMT, Nhat Nguyen <github.com+8022952+nhat-nguyen at openjdk.org> wrote:

> I'm following up on the reviewing thread here: https://mail.openjdk.java.net/pipermail/nio-dev/2020-August/007456.html
> 
> All the tests that create symlinks are now properly checked against using `TestUtil.supportsLinks`

The update to WindowsFileStore looks okay.

The test has good coverage but I worry that creating X: will not be reliable in some CI environments, esp. if X: exists
already or permissions are needed. I'll try your test in our CI and would be good if others did the same.

One terminology nit is that the file system API uses the term "directory". The test uses a mix of "directory" and
"folder" would be good to keep it consistent if possible.

I don't think the addition to TestUtil is needed, the createRootTempDirectory method can call Files.createTmpDirectory.

Many of the existing TestNG tests import statically Asserts and could be done here too.

substList should return Stream<Srring>, we try to avoid raw types.

No need to import java.lang.ProcessBuilder, also would be good to clean import the imports, no need for a space between
each java.* package.

-------------

PR: https://git.openjdk.java.net/jdk/pull/287


More information about the nio-dev mailing list