RFR 8194746: (fs) Add equivalents of Paths.get to Path interface

Brian Burkhalter brian.burkhalter at oracle.com
Thu Mar 8 22:52:08 UTC 2018


Updated patch with the improvements suggested below:

http://cr.openjdk.java.net/~bpb/8194746/webrev.01/

On Mar 8, 2018, at 12:07 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> We also to add @since 11 to the new methods

Done.

> and I'm wondering about adding an @apiNote to Path's class description to indicate that it's obsolete and that the static methods defined by Path should be used in preference. I don't think Paths needs to be deprecated of course, I'm just thinking of developers wondering what the Paths class is for.

Added to Paths’s class description:
  35  * @apiNote
  36  * This class is obsolete. Its {@code get()} methods simply invoke the
  37  * corresponding static methods defined by {@link #Path} which should be used
  38  * in preference.
On Mar 8, 2018, at 1:05 AM, Chris Hegarty <chris.hegarty at oracle.com> wrote:

> I wonder if an @implSpec is too strong here. I guess I expected to see:
>    * <p> Equivalent to: {@code Path.get(String, String…)}

Changed for example to:
  77      * <p> This method simply invokes {@link Path#get(String,String...)
  78      * Path.get(String, String...)} with the given parameters.
> Example snippets in the javadoc could use {@code …}, for example
> 
>    * <pre>{@code 
>    *     Path dir = ...
>    *     Path path = dir.resolve("file");
>    * }</pre>

Fixed.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180308/7df998c1/attachment.html>


More information about the nio-dev mailing list