hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-core git commit: HTTPCORE-477 - add missing Locale.ROOT settings, otherwise test may fail on different platforms
Date Wed, 12 Jul 2017 19:02:14 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/master 22b30a665 -> 294bc9cf0


HTTPCORE-477 - add missing Locale.ROOT settings, otherwise test may fail on different platforms


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/294bc9cf
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/294bc9cf
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/294bc9cf

Branch: refs/heads/master
Commit: 294bc9cf077bee2fd53499b50de83730ff772286
Parents: 22b30a6
Author: onders86 <ondersezgin@gmail.com>
Authored: Wed Jul 12 14:24:18 2017 +0300
Committer: onders86 <ondersezgin@gmail.com>
Committed: Wed Jul 12 14:24:18 2017 +0300

----------------------------------------------------------------------
 httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/294bc9cf/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
index 33a8e7a..055d4a0 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
@@ -183,7 +183,7 @@ public class TimeValue {
             throw new IllegalArgumentException(
                     String.format("Expected format for <Integer><SPACE><TimeUnit>:
", value));
         }
-        return TimeValue.of(NumberFormat.getInstance().parse(split[0]).longValue(),
+        return TimeValue.of(NumberFormat.getInstance(Locale.ROOT).parse(split[0]).longValue(),
                 TimeUnit.valueOf(split[1].trim().toUpperCase(Locale.ROOT)));
     }
 
@@ -296,7 +296,7 @@ public class TimeValue {
 
     @Override
     public String toString() {
-        return String.format("%,d %s", duration, timeUnit);
+        return String.format(Locale.ROOT, "%,d %s", duration, timeUnit);
     }
 
     public Timeout toTimeout() {


Mime
View raw message