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

Brian Burkhalter brian.burkhalter at oracle.com
Wed Mar 14 20:09:00 UTC 2018


An updated version with the change s/Path.get/Path.of/ and most of the Paths.get() javadoc excised is at

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

For the sake of clarity, this omits the changes to other files in java.base which will be modified as s/Paths.get/Path.of/.

Alternative verbiage for the API Note in Paths might be:

--- a/src/java.base/share/classes/java/nio/file/Paths.java
+++ b/src/java.base/share/classes/java/nio/file/Paths.java
@@ -33,9 +33,9 @@
  * by converting a path string or {@link URI}.
  *
  * @apiNote
- * This class is obsolete. Its {@code get()} methods simply invoke the
- * equivalent static {@code of()} methods defined by {@link Path} which should
- * be used in preference.
+ * As of JDK 11, the preferred way to obtain a {@code Path} is via the
+ * {@link Path#get(String,String...) Path.get(String, String...)} or
+ * {@link Path#get(URI) Path.get(URI)} methods.

I will update the corresponding CSR according to the outcome of this review thread.

Thanks,

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


More information about the nio-dev mailing list