File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2121import java .net .URL ;
2222import java .nio .file .InvalidPathException ;
2323import java .nio .file .Path ;
24+ import java .nio .file .Paths ;
2425import java .text .SimpleDateFormat ;
2526import java .util .Date ;
2627
@@ -52,9 +53,9 @@ public interface Converter<T, E extends Throwable> {
5253 Converter <File , NullPointerException > FILE = File ::new ;
5354
5455 /**
55- * Path converter. Calls {@code new File(s).toPath( )}.
56+ * Path converter. Calls {@link Paths#get(java.net.URI )}.
5657 */
57- Converter <Path , InvalidPathException > PATH = s -> new File ( s ). toPath () ;
58+ Converter <Path , InvalidPathException > PATH = Paths :: get ;
5859
5960 /**
6061 * Number converter. Converts to a Double if a decimal point ('.') is in the
You can’t perform that action at this time.
0 commit comments