Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196215

sun/security/util/Resources/customSysClassLoader/MessageFormatting.java failed on ar_SA locale.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 10
    • security-libs

      Test build: JDK 10 build 41
      Test env: Mac 10.13 with ar_SA locale.

      Error message:
      Expected string:
      line \u0660: \u0661
      Actual string:
      line 0: 1
      java.lang.Exception: Incorrect message string
      at MessageFormatting.main(MessageFormatting.java:55)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)

      JavaTest Message: Test threw exception: java.lang.Exception: Incorrect message string
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.Exception: Incorrect message string

      L65: MessageFormat format = new MessageFormat(str) uses system default locale which is ar_SA to construct a MessageFormat which uses ARABIC-INDIC digits(\u0660~\u0669), not (0~9) to display the numbers.
      Suggest to use MessageFormat​(String pattern, Locale locale) and specify en_US locale to construct a MessageFormat.

            apetcher Adam Petcher (Inactive)
            dzhou Dora Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: