<i18n dev> RFR: 8357281: sun.util.Locale.LanguageTag should be immutable [v3]

Justin Lu jlu at openjdk.org
Thu May 22 17:51:32 UTC 2025


> _sun.util.Locale.LanguageTag_ is essentially a BCP47 language tag data carrier for Locale. The class, once created is not modified; the class should be made immutable. Converting the class to a record accomplishes this and also simplifies some of the existing code.

Justin Lu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - extLangs -> extlangs
 - Merge branch 'master' into JDK-8357281-LanguageTag
 - review: subtag -> subtags, switch on baseLang, improve fragility of list field accessors
 - init

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/25371/files
  - new: https://git.openjdk.org/jdk/pull/25371/files/2d778a85..a5429599

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25371&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25371&range=01-02

  Stats: 43668 lines in 640 files changed: 29920 ins; 10197 del; 3551 mod
  Patch: https://git.openjdk.org/jdk/pull/25371.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25371/head:pull/25371

PR: https://git.openjdk.org/jdk/pull/25371


More information about the i18n-dev mailing list