<i18n dev> RFR: 8368981: Case Fold Locale Legacy Tags On Demand [v2]

Naoto Sato naoto at openjdk.org
Thu Oct 2 16:08:33 UTC 2025


On Thu, 2 Oct 2025 14:52:20 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   implemenet Naoto's review
>
> src/java.base/share/classes/sun/util/locale/LanguageTag.java line 516:
> 
>> 514:         if (tag.length() > 11 || tag.length() < 5) {
>> 515:             return null;
>> 516:         }
> 
> I can see the < 5 having some saving if most of the tags are short.
> I doubt the > 11 saves anything and it creates a maintenance gotcha, if a tag is added that is longer.

Per RFC, it is guaranteed that the list of the grandfathered (=legacy) tags will never change (https://datatracker.ietf.org/doc/html/rfc5646#section-2.1)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27596#discussion_r2399329170


More information about the i18n-dev mailing list