A DESCRIPTION OF THE PROBLEM :
Usage of java.nio.file.Path is rather cumbersome when resolving multiple constant children against an existing path, e.g.:
applicationPath.resolve("path").resolve("to").resolve("resource")
This often leads to developers falling back to hardcoding file path separators just because it is better readable (but also more error-prone).
java.nio.file.Path should have a `resolve` overload with varargs String, either:
- Path.resolve(String... others)
- Path.resolve(String other, String... others)
(This was originally mentioned inJDK-6878345 as well, but was apparently not implemented)
Usage of java.nio.file.Path is rather cumbersome when resolving multiple constant children against an existing path, e.g.:
applicationPath.resolve("path").resolve("to").resolve("resource")
This often leads to developers falling back to hardcoding file path separators just because it is better readable (but also more error-prone).
java.nio.file.Path should have a `resolve` overload with varargs String, either:
- Path.resolve(String... others)
- Path.resolve(String other, String... others)
(This was originally mentioned in
- csr for
-
JDK-8312123 (fs) Add Path::resolve with varargs string
- Closed