This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-cli.git
commit 6349e710493d868072b01bd1495c56fc0423d30f Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jan 29 09:28:49 2024 -0500 Use NIO directly for Converter.PATH --- src/main/java/org/apache/commons/cli/Converter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/cli/Converter.java b/src/main/java/org/apache/commons/cli/Converter.java index cf96bb1..b6d80a5 100644 --- a/src/main/java/org/apache/commons/cli/Converter.java +++ b/src/main/java/org/apache/commons/cli/Converter.java @@ -21,6 +21,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.nio.file.InvalidPathException; import java.nio.file.Path; +import java.nio.file.Paths; import java.text.SimpleDateFormat; import java.util.Date; @@ -52,9 +53,9 @@ public interface Converter<T, E extends Throwable> { Converter<File, NullPointerException> FILE = File::new; /** - * Path converter. Calls {@code new File(s).toPath()}. + * Path converter. Calls {@link Paths#get(java.net.URI)}. */ - Converter<Path, InvalidPathException> PATH = s -> new File(s).toPath(); + Converter<Path, InvalidPathException> PATH = Paths::get; /** * Number converter. Converts to a Double if a decimal point ('.') is in the