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-io.git
commit bb6b3d3a3d3be53edb1b204639127753bf46d3ac Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat May 13 09:42:31 2023 -0400 FileSystemUtils.performCommand(String[], int, Duration): Use Locale.ROOT instead of ENGLISH. --- src/changes/changes.xml | 3 +++ src/main/java/org/apache/commons/io/FileSystemUtils.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8e8600e3..2371d30e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -227,6 +227,9 @@ The <action> type attribute can be add,update,fix,remove. <action dev="ggregory" type="fix" due-to="Gary Gregory"> Serialization is deprecated and will be removed in 3.0. </action> + <action dev="ggregory" type="fix" due-to="Gary Gregory"> + FileSystemUtils.performCommand(String[], int, Duration): Use Locale.getDefault() instead of ENGLISH. + </action> <!-- ADD --> <action type="add" dev="ggregory" due-to="Gary Gregory"> Add GitHub coverage.yml. diff --git a/src/main/java/org/apache/commons/io/FileSystemUtils.java b/src/main/java/org/apache/commons/io/FileSystemUtils.java index 884368d7..b4295c84 100644 --- a/src/main/java/org/apache/commons/io/FileSystemUtils.java +++ b/src/main/java/org/apache/commons/io/FileSystemUtils.java @@ -485,7 +485,7 @@ public class FileSystemUtils { // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027 // http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018 // however, it's still not perfect as the JDK support is so poor - // (see commons-exec or Ant for a better multithreaded multi-os solution) + // (see commons-exec or Ant for a better multithreaded multi-OS solution) final List<String> lines; Process proc = null; @@ -501,10 +501,10 @@ public class FileSystemUtils { in = proc.getInputStream(); out = proc.getOutputStream(); err = proc.getErrorStream(); - // default charset is most likely appropriate here + // default Charset is most likely appropriate here inr = new BufferedReader(new InputStreamReader(in, Charset.defaultCharset())); - lines = inr.lines().limit(max).map(line -> line.toLowerCase(Locale.ENGLISH).trim()).collect(Collectors.toList()); + lines = inr.lines().limit(max).map(line -> line.toLowerCase(Locale.getDefault()).trim()).collect(Collectors.toList()); proc.waitFor();