no (String, Locale) constructor on MessageFormat pre JDK 1.4
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@600606 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
686f2f611c
commit
524f1518d9
|
@ -156,6 +156,11 @@ public abstract class MessageFormatTest extends AbstractMessageFormatTest {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
protected MessageFormat createMessageFormat(String pattern, Locale locale) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue