RFR: 8262742: (fs) Add Path::resolve with varargs string [v2]
Brian Burkhalter
bpb at openjdk.org
Mon Jul 17 21:18:55 UTC 2023
On Wed, 12 Jul 2023 00:48:30 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> test/jdk/java/nio/file/Path/PathOps.java line 1728:
>>
>>> 1726: .resolve("/foo", "", "foo")
>>> 1727: .resolve("/bar", "foo", "", "/bar");
>>> 1728:
>>
>> Should there be test cases that include multiple directories in a path: "abc/def/xyz"?
>> Also cases with "..", or is that only relevant if canonicalizing.
>
> Multiple directories would be good but I don't know about `..`.
> Should there be test cases that include multiple directories in a path: "abc/def/xyz"?
Added some multiple directory cases in 505d72b48c5d34bbf4474c6fed43e2f269e8e135.
> Also cases with ".."
This is not relevant. For example, using the existing `resolve(Path)`:
jshell> java.nio.file.Path.of("/tmp").resolve("..").resolve("..")
$1 ==> /tmp/../..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14805#discussion_r1265912379
More information about the nio-dev
mailing list