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

Nhat Nguyen github.com+8022952+nhat-nguyen at openjdk.java.net
Tue Oct 6 19:19:08 UTC 2020


On Tue, 6 Oct 2020 14:17:41 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> The updated test looks much better and passes in our infrastructure since the remove of the toRealPath test. I'm still
> bothered by the hardcoded "X:". Does subst (and hence substCreate) fail if that volume already exists?

subst will fail if that volume already exists. I have added a method to find any available drive to be used with subst;
it simply tries calling substCreate with drive letters from Z down to A. If none is available, it will throw a
SkipException to skip the whole suite.

> substList can be changed to return List.

What is your opinion on substList returning Stream<String> like you mentioned before? I think it is perhaps cleaner
than List<String> because I would call .anyMatch() which is a stream API on the return value of substList.

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

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


More information about the nio-dev mailing list