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

Add warnings for locale data dependence

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 23
    • core-libs
    • None
    • behavioral
    • minimal
    • This is a doc only change.
    • Java API
    • SE

      Summary

      Add warnings for locale data dependence

      Problem

      Locale data provided by CLDR are continuously refined. Some changes cause incompatibility issues in users' applications.

      Solution

      Add a note in the java.util.spi.LocaleServiceProvider's JDK vs. CLDR chart mentioning avoiding the dependency on a particular version of locale data.

      Specification

      --- a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java
      +++ b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java
      @@ -152,6 +152,9 @@
        * supported by the Java runtime environment. The following table lists the
        * version of CLDR used in each JDK release. Unless otherwise specified, all
        * update releases in a given JDK release family use the same CLDR version.
      + * Note that the CLDR locale data are subject to change. Users should not assume
      + * that the locale data remain the same across CLDR versions. Otherwise, unexpected
      + * incompatible behaviors may occur, such as an exception on parsing a date.
      + * Refer to <a href="https://cldr.unicode.org/index/downloads">CLDR Releases</a>
      + * for the deltas between their releases.
        * <table class="striped">
        * <caption style="display:none">JDK releases and supported CLDR versions</caption>
        * <thead>

            naoto Naoto Sato
            naoto Naoto Sato
            Joe Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: