Cannot parse JapaneseDate string on some specified locales

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 13
    • Affects Version/s: 13
    • Component/s: core-libs

      Compile and run the test case with default locale data providers or CLDR,COMPAT provider
      Result: will get exception on below locales
      el, el_CY, el_GR, fa, fa_AF, fa_IR, uk, uk_UA

      --------BEGIN SOURCE---------
      public static void findMissingJTS() {
      LocalDate date = LocalDate.of(2019, 5, 1);
      DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy MM dd GGGG");
      formatter = formatter.withChronology(JapaneseChronology.INSTANCE);

      int num = 0;
      for (Locale locale : Calendar.getAvailableLocales()) {
      formatter = formatter.withLocale(locale);
      try {
      LocalDate.parse(date.format(formatter), formatter);
      } catch (DateTimeParseException e) {
      num++;
      System.out.println("Missing JTS data for locale: " + locale);
      }
      }
      if (num > 0) {
      throw new RuntimeException("Missing some JTS data update");
      }
      }

      ----END SOURCE------

            Assignee:
            Naoto Sato
            Reporter:
            Daisy Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: