RFR: 8357281: sun.util.Locale.LanguageTag should be immutable [v2]

Justin Lu jlu at openjdk.org
Thu May 22 16:46:10 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 incrementally with one additional commit since the last revision:

  review: subtag -> subtags, switch on baseLang, improve fragility of list field accessors

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

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

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

  Stats: 63 lines in 1 file changed: 12 ins; 16 del; 35 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 core-libs-dev mailing list