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

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • core-libs
    • b142
    • generic
    • generic
    • 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. MonthTest.java
          1 kB
        2. jdk8u66b18.txt
          2 kB
        3. jdk9b100.txt
          2 kB

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: