8196215: sun/security/util/Resources/customSysClassLoader/MessageFormatting.java failed on ar_SA locale
Fixing a minor bug in a test related to policy parser message formatting Reviewed-by: mullan, xuelei
This commit is contained in:
parent
e3b7698786
commit
8dcabfdf5f
@ -28,10 +28,12 @@ import java.text.MessageFormat;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8168075
|
||||
* @bug 8168075 8196215
|
||||
* @summary Ensure that security message formatting code is capable of
|
||||
* displaying all messages.
|
||||
* @modules java.base/sun.security.util
|
||||
* @run main MessageFormatting
|
||||
* @run main/othervm -Duser.country=SA -Duser.language=ar MessageFormatting
|
||||
*/
|
||||
|
||||
public class MessageFormatting {
|
||||
@ -63,7 +65,8 @@ public class MessageFormatting {
|
||||
if (str.indexOf('{') < 0) {
|
||||
return str;
|
||||
}
|
||||
MessageFormat format = new MessageFormat(str);
|
||||
Locale loc = new Locale("en", "US");
|
||||
MessageFormat format = new MessageFormat(str, loc);
|
||||
return format.format(args);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user