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

java.time.Month.getDisplayName() return incorrct narrow names with JRE provider on locale de,de_DE,en_US,tr_TR.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b142
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Product version: JDK9b100

      REPRODUCIBILITY :
      This bug can be reproduced always in JDK9b100.
      This bug can not be reproduced in JDK8u66-b18.

      The test case is to verify Month.getDisplayName() with different TextStyle and different provider on different locale. It failed when specifying "-Djava.locale.providers=JRE" and TextStyle to "NARROW" and "NARROW_STANDALONE" on de, de_DE, en_US, tr_TR locale. I wrote a sample code to reproduce this issue, please refer to attachment MonthTest.java.

      Expect result:
      Output should be same with running on JDK8. Please refer to attachment jdk8u66b18.txt.

      Actual result:
      On en_US, de, de_DE locale, output of narrow month name is a digit.
      On tr_TR locale, output of narrow and standalone narrow month name is a digit.
      Please refer to attachment jdk9b100.txt.

      How to reproduce:
      Run attachment sample code MonthTest.java:
      java -Djava.locale.providers=JRE MonthTest

        Attachments

        1. jdk8u66b18.txt
          2 kB
        2. jdk9b100.txt
          2 kB
        3. MonthTest.java
          1 kB

          Issue Links

            Activity

              People

              Assignee:
              rgoel Rachna Goel (Inactive)
              Reporter:
              dzhou Dora Zhou (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: