RFR: 8262742: (fs) Add Path::resolve with varargs string [v3]

Alan Bateman alanb at openjdk.org
Wed Jul 12 11:35:10 UTC 2023


On Wed, 12 Jul 2023 00:53:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Add to `java.nio.file.Path` methods which allow resolution of multiple descendants.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8262742: Verbiage cleanup

src/java.base/share/classes/java/nio/file/Path.java line 520:

> 518: 
> 519:     /**
> 520:      * Resolves a path, or a sequence of paths against this path.

I think we'll need to come up with a better first line because the method doesn't resolve the sequence of paths against this path, it instead resolves the first path against this path, then iteratively resolves.

I think the second paragraph will need to include something about empty elements, as we have in the existing resolve spec.

src/java.base/share/classes/java/nio/file/Path.java line 539:

> 537:      * @param first the first path to resolve against this path
> 538:      *
> 539:      * @param more additional paths to be joined to form the path

"additional paths to be joined to form the path" may be copied from elsewhere :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14805#discussion_r1261043373
PR Review Comment: https://git.openjdk.org/jdk/pull/14805#discussion_r1261043761


More information about the nio-dev mailing list