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

Remi Forax forax at univ-mlv.fr
Wed Mar 7 22:09:13 UTC 2018

Hi Brian,
i really like the fact that instead of having Path.get() that delegates to Paths.get(), you wire the methods in the other direction,
that's clever.


----- Mail original -----
> De: "Brian Burkhalter" <brian.burkhalter at oracle.com>
> À: "nio-dev" <nio-dev at openjdk.java.net>
> Envoyé: Mercredi 7 Mars 2018 22:57:27
> Objet: RFR 8194746: (fs) Add equivalents of Paths.get to Path interface

> https://bugs.openjdk.java.net/browse/JDK-8194746
> http://cr.openjdk.java.net/~bpb/8194746/webrev.00/
> The main changes in are in Path and Paths in java.nio.file.
> This patch copies the Paths.get() methods to static methods in Path.get() and
> modifies the former to call the latter respective methods. The Path
> specification is slightly cleaned up not to refer to Paths nor itself, e.g.,
> “(see Path).” @implSpec annotations are added to Paths to indicate that the
> methods simply call their counterparts in Path.
> All source files in java.base are modified to change Paths.get() to Path.get()
> and to remove the import for Paths. The copyright year is not yet updated in
> these files.
> No tests are added or modified as Paths is final and the Path.get() methods end
> up being invoked indirectly in existing tests.
> Perhaps some excision of the specification verbiage in Paths is called for to
> minimize duplication?
> Once this starts to achieve consensus a CSR will be filed.
> Thanks,
> Brian

More information about the nio-dev mailing list