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

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

Repository: commons-text
Updated Branches:
  refs/heads/master dc10b4c10 -> 61a0be4ee


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/master
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);
     }
 
     /**


[2/2] [text] Merge branch 'fix-locale-issues'

Posted by ki...@apache.org.
Merge branch 'fix-locale-issues'

This closes #35 and fixes TEXT-64


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

Branch: refs/heads/master
Commit: 61a0be4ee614ea4a5f922e4502d6b761d97ee7ef
Parents: dc10b4c 3a64140
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Authored: Thu Mar 2 14:45:17 2017 +1300
Committer: Bruno P. Kinoshita <br...@yahoo.com.br>
Committed: Thu Mar 2 14:45:17 2017 +1300

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