commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r600606 - /commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java
Date Mon, 03 Dec 2007 17:21:10 GMT
Author: mbenson
Date: Mon Dec  3 09:21:09 2007
New Revision: 600606

URL: http://svn.apache.org/viewvc?rev=600606&view=rev
Log:
no (String, Locale) constructor on MessageFormat pre JDK 1.4

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java?rev=600606&r1=600605&r2=600606&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/MessageFormatTest.java
Mon Dec  3 09:21:09 2007
@@ -156,6 +156,11 @@
      * {@inheritDoc}
      */
     protected MessageFormat createMessageFormat(String pattern, Locale locale) {
-        return new MessageFormat(pattern, locale);
+        MessageFormat result = new MessageFormat(pattern);
+        if (!Locale.getDefault().equals(locale)) {
+            result.setLocale(locale);
+            result.applyPattern(pattern);
+        }
+        return result;
     }
 }



Mime
View raw message