Skip to content

Commit bb6b3d3

Browse files
committed
FileSystemUtils.performCommand(String[], int, Duration): Use Locale.ROOT
instead of ENGLISH.
1 parent f476fd5 commit bb6b3d3

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ The <action> type attribute can be add,update,fix,remove.
227227
<action dev="ggregory" type="fix" due-to="Gary Gregory">
228228
Serialization is deprecated and will be removed in 3.0.
229229
</action>
230+
<action dev="ggregory" type="fix" due-to="Gary Gregory">
231+
FileSystemUtils.performCommand(String[], int, Duration): Use Locale.getDefault() instead of ENGLISH.
232+
</action>
230233
<!-- ADD -->
231234
<action type="add" dev="ggregory" due-to="Gary Gregory">
232235
Add GitHub coverage.yml.

src/main/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final Dura
485485
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
486486
// http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018
487487
// however, it's still not perfect as the JDK support is so poor
488-
// (see commons-exec or Ant for a better multithreaded multi-os solution)
488+
// (see commons-exec or Ant for a better multithreaded multi-OS solution)
489489

490490
final List<String> lines;
491491
Process proc = null;
@@ -501,10 +501,10 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final Dura
501501
in = proc.getInputStream();
502502
out = proc.getOutputStream();
503503
err = proc.getErrorStream();
504-
// default charset is most likely appropriate here
504+
// default Charset is most likely appropriate here
505505
inr = new BufferedReader(new InputStreamReader(in, Charset.defaultCharset()));
506506

507-
lines = inr.lines().limit(max).map(line -> line.toLowerCase(Locale.ENGLISH).trim()).collect(Collectors.toList());
507+
lines = inr.lines().limit(max).map(line -> line.toLowerCase(Locale.getDefault()).trim()).collect(Collectors.toList());
508508

509509
proc.waitFor();
510510

0 commit comments

Comments
 (0)