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

[HOST provider, not gregory] Return NULL when calling Calendar.getDisplayNames for Calendar.ERA

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 8u20, 9
    • core-libs
    • In my test, it's win2008r2 MUI.
      Locale is set to ja and calendar is set to Japanese calendar
      or Locale is set to th and calendar is set to Buddhist.

    • 8
    • b101
    • generic
    • windows

      Run the attached program (CalendarTest.java) on windows with locale set to Japanese and calendar set to Japanese calendar.

      When -Djava.locale.providers=HOST, the map got from "Map<String, Integer> map = cal.getDisplayNames(Calendar.ERA, Calendar.LONG, new Locale("ja", "JP", "JP"));" is null.

      Screen shot is also attached.

      If the locale provider is not HOST, there is no exception. If the calendar of the windows is Gregory, it also works fine. Same kind of problem also happens in windows th-TH with calendar set to Buddhist.

            naoto Naoto Sato
            yhuang Yong Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: