8196215: sun/security/util/Resources/customSysClassLoader/MessageFormatting.java failed on ar_SA locale.
Summary: Fixing a minor bug in a test related to policy parser message formatting
Reviewed-by: mullan, xuelei
--- a/test/jdk/sun/security/util/Resources/customSysClassLoader/MessageFormatting.java Thu Feb 08 10:55:21 2018 +0000
+++ b/test/jdk/sun/security/util/Resources/customSysClassLoader/MessageFormatting.java Thu Feb 08 10:06:57 2018 -0500
@@ -28,10 +28,12 @@
/*
* @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 @@
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);
}
}