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

Clarify the spec wrt `useOldISOCodes` system property

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 17
    • core-libs
    • None
    • minimal
    • This is doc-only change.
    • System or security property
    • SE

      Summary

      Clarify the description of java.locale.useOldISOCodes system property so that users won't be misguided about the behavior.

      Problem

      The system property is only read at the runtime startup time, so it is expected that System.setProperty() has no effect on the behavior, users would expect that the behavior would be changed based on the setProperty() value.

      Solution

      Add some text, somewhere along the line with the system property is only read at the runtime startup.

      Specification

      Replace the paragraph that describes the java.locale.useOldISOCodes system property in the class description of java.util.Locale

      from:

       * <p>For the backward compatible behavior, the system property
       * {@systemProperty java.locale.useOldISOCodes} reverts the behavior
       * back to prior to Java SE 17 one. If the system property is set
       * to {@code true}, those three current language codes are mapped to their
       * backward compatible forms.

      to:

       * <p>For the backward compatible behavior, the system property
       * {@systemProperty java.locale.useOldISOCodes} reverts the behavior
       * back to that of before Java SE 17. If the system property is set to
       * {@code true}, those three current language codes are mapped to their
       * backward compatible forms. The property is only read at Java runtime
       * startup and subsequent calls to {@code System.setProperty()} will
       * have no effect.

            naoto Naoto Sato
            amadgundi Asha Madgundi (Inactive)
            Brian Burkhalter, Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: