You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2008/03/07 23:40:39 UTC
svn commit: r634854 -
/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
Author: niallp
Date: Fri Mar 7 14:40:39 2008
New Revision: 634854
URL: http://svn.apache.org/viewvc?rev=634854&view=rev
Log:
Fix tests not compiling under JDK 1.3
Modified:
commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java?rev=634854&r1=634853&r2=634854&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/ExtendedMessageFormatTest.java Fri Mar 7 14:40:39 2008
@@ -248,11 +248,10 @@
buffer.append("], locale=[");
buffer.append(locale);
buffer.append("]");
- MessageFormat mf = null;
- if (locale == null) {
- mf = new MessageFormat(pattern);
- } else {
- mf = new MessageFormat(pattern, locale);
+ MessageFormat mf = new MessageFormat(pattern);
+ if (locale != null) {
+ mf.setLocale(locale);
+ mf.applyPattern(pattern);
}
// System.out.println(buffer + ", result=[" + mf.format(args) +"]");
ExtendedMessageFormat emf = null;