diff --git a/src/test/org/apache/commons/lang/text/MessageFormatTest.java b/src/test/org/apache/commons/lang/text/MessageFormatTest.java index 82964f361..de9af7520 100644 --- a/src/test/org/apache/commons/lang/text/MessageFormatTest.java +++ b/src/test/org/apache/commons/lang/text/MessageFormatTest.java @@ -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; } }