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:
Matthew Jason Benson 2007-12-03 17:21:09 +00:00
parent 686f2f611c
commit 524f1518d9
1 changed files with 6 additions and 1 deletions

View File

@ -156,6 +156,11 @@ public abstract class MessageFormatTest extends AbstractMessageFormatTest {
* {@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;
}
}