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

Chen Liang liach at openjdk.org
Thu May 22 18:07:52 UTC 2025


On Thu, 22 May 2025 17:51:32 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> _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

This version looks much better. You might want the original author Yoshito or another I18N reviewer to check too.

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25371#pullrequestreview-2862145268


More information about the core-libs-dev mailing list