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

sun.util.Locale.LanguageTag should be immutable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • Fix Understood
    • generic
    • generic

      `sun/util/Locale/LanguageTag`, (private to Locale) is a pure data carrier which is not modified once created. Currently LanguageTag has some non-final fields, which should be final to make the class immutable. It would be better if converted as a record, and its instance fields implicitly made final.

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: