JDK-6878345 : (file) Paths.get(String) and Path.resolve(String) should support varargs
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2009-09-02
  • Updated: 2011-01-19
  • Resolved: 2011-01-19
Related Reports
Duplicate :  
Description
Where a path is created from a sequence of names it requires code like following:
  Path file = dir.resolve("images" + fs + "foo.png");
or
  Path file = dir.resolve("images").resolve("folder.png");

It has been suggested that FileSystem.getPath(String), and Path.resolve(String) be extended to use varargs so as to support usages such as the following:
  Path file = dir.resolve("images", "folder.png");

Comments
EVALUATION The Paths.get and FileSystem.getPath will be updated to use var-args as part of the changes coming in 7006126.
19-01-2011