RFR: 8298478: (fs) Path.of should allow input to include long path prefix [v2]
Brian Burkhalter
bpb at openjdk.org
Tue Feb 7 19:19:11 UTC 2023
On Tue, 7 Feb 2023 11:44:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8298478: Verify parsed type is acceptable for prefix type; add some cases to test
>
> src/java.base/windows/classes/sun/nio/fs/WindowsPathParser.java line 172:
>
>> 170: throw new InvalidPathException(input, "Long path prefix must precede an absolute path");
>> 171: } else if (prefixType == PREFIX_TYPE_LONG_UNC && type != WindowsPathType.UNC) {
>> 172: throw new InvalidPathException(input, "Long UNC path prefix must precede a UNC path");
>
> I don't think the text should have "must precede" as someone reading this might assume they must use this prefix. Maybe say "cannot be used with ..." ?
Fixed in 90ef2d30a9ed8f7ddb5891836663e5f8728a948d.
-------------
PR: https://git.openjdk.org/jdk/pull/12423
More information about the nio-dev
mailing list