You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/03/04 01:00:13 UTC

[48/50] [abbrv] [text] Use Category.FORMAT for Locale.getDefault() to fix test failures when locale not set to en

Use Category.FORMAT for Locale.getDefault() to fix test failures when locale not set to en


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/3a641403
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/3a641403
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/3a641403

Branch: refs/heads/release
Commit: 3a641403fc496591f60c68d68cc28784a617e2c9
Parents: dc10b4c
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Authored: Wed Mar 1 10:32:27 2017 +1300
Committer: Bruno P. Kinoshita <br...@yahoo.com.br>
Committed: Wed Mar 1 10:32:27 2017 +1300

----------------------------------------------------------------------
 .../java/org/apache/commons/text/ExtendedMessageFormat.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/3a641403/src/main/java/org/apache/commons/text/ExtendedMessageFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/ExtendedMessageFormat.java b/src/main/java/org/apache/commons/text/ExtendedMessageFormat.java
index 2a08bbf..372ae34 100644
--- a/src/main/java/org/apache/commons/text/ExtendedMessageFormat.java
+++ b/src/main/java/org/apache/commons/text/ExtendedMessageFormat.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Locale;
+import java.util.Locale.Category;
 import java.util.Map;
 import java.util.Objects;
 
@@ -117,7 +118,7 @@ public class ExtendedMessageFormat extends MessageFormat {
      * @throws IllegalArgumentException in case of a bad pattern.
      */
     public ExtendedMessageFormat(final String pattern) {
-        this(pattern, Locale.getDefault());
+        this(pattern, Locale.getDefault(Category.FORMAT));
     }
 
     /**
@@ -140,7 +141,7 @@ public class ExtendedMessageFormat extends MessageFormat {
      */
     public ExtendedMessageFormat(final String pattern,
                                  final Map<String, ? extends FormatFactory> registry) {
-        this(pattern, Locale.getDefault(), registry);
+        this(pattern, Locale.getDefault(Category.FORMAT), registry);
     }
 
     /**