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

Brian Burkhalter brian.burkhalter at oracle.com
Wed Mar 7 21:57:27 UTC 2018


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.



More information about the nio-dev mailing list