8196215: sun/security/util/Resources/customSysClassLoader/MessageFormatting.java failed on ar_SA locale.
authorapetcher
Thu, 08 Feb 2018 10:06:57 -0500
changeset 48762 85c27aabf312
parent 48761 74c1fa26435a
child 48763 3d17a524da95
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
test/jdk/sun/security/util/Resources/customSysClassLoader/MessageFormatting.java
--- 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);
     }
 }