Path.getRoot() javadoc says:
Returns the root component of this path as a Path object, or null if this path does not have a root component.
Returns:
a path representing the root component of this path, or null
If somePath.toAbsolutePath().getRoot() is called, can users assume getRoot won't return null - at least for the standard Unix and Windows file system provider
Returns the root component of this path as a Path object, or null if this path does not have a root component.
Returns:
a path representing the root component of this path, or null
If somePath.toAbsolutePath().getRoot() is called, can users assume getRoot won't return null - at least for the standard Unix and Windows file system provider
- csr for
-
JDK-8356804 (fs) Path::toAbsolutePath should specify if an absolute path has a root component
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/0318e495
-
Review(master) openjdk/jdk/25161