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

Emit warning for removal of `COMPAT` provider



    • CSR
    • Resolution: Approved
    • P4
    • 21
    • core-libs
    • None
    • behavioral
    • minimal
    • This change is to simply emit the warning, not actually removing `COMPAT`.
    • Java API
    • SE



      Emit a warning for removal message if COMPAT is specified with java.locale.providers system property


      COMPAT locale provider has remained to keep the backward compatibility of JDK 8's locale data, since CLDR-based locale data became the default in JDK 9. The intention was to encourage applications to migrate to CLDR, so for future removal of the COMPAT locale provider, acknowledging the user of future removal is recommended.


      If COMPAT and/or JRE is specified in the command line option of java.locale.providers system property, print a message warning the user of future removal. Also, replace the wording of the defunct "Java Runtime Environment" with "JDK Reference Implementation."


      Modify the class description of java.util.spi.LocaleServiceProvider class as follows:

      @@ -118,22 +118,23 @@
         * the locale sensitive services separated by a comma. As this property value is
         * read and cached only at the initialization of this class, users should specify the
         * property on the java launcher command line. Setting it at runtime with
         * {@link System#setProperty(String, String)} is discouraged and it may not affect
         * the order.
      -  * <p>
      -  * Java Runtime Environment provides the following four locale providers:
      +  * JDK Reference Implementation provides the following four
      +  * locale providers:
         * <ul>
         * <li> "CLDR": A provider based on Unicode Consortium's
         * <a href="http://cldr.unicode.org/">CLDR Project</a>.
         * <li> "COMPAT": represents the locale sensitive services that is compatible
      -  * with the prior JDK releases up to JDK8 (same as JDK8's "JRE").
      +  * with the prior JDK releases up to JDK 8 (same as JDK 8's "JRE"). This
      +  * provider is deprecated and will be removed in the future release of JDK.
         * <li> "SPI": represents the locale sensitive services implementing the subclasses of
         * this {@code LocaleServiceProvider} class.
         * <li> "HOST": A provider that reflects the user's custom settings in the
         * underlying operating system. This provider may not be available, depending
      -  * on the Java Runtime Environment implementation.
      +  * on the JDK Reference Implementation.
         * <li> "JRE": represents a synonym to "COMPAT". This name
         * is deprecated and will be removed in the future release of JDK.
         * </ul>
         * <p>
         * For example, if the following is specified in the property:


        Issue Links



              naoto Naoto Sato
              naoto Naoto Sato
              Alan Bateman
              0 Vote for this issue
              4 Start watching this issue