On Wed, 1 Jul 2026 18:02:55 GMT, Naoto Sato <[email protected]> wrote:

>> Justin Lu has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Review - add empty script checking for no_NO_NY case as well
>
> src/java.base/share/classes/sun/util/locale/InternalLocaleBuilder.java line 
> 405:
> 
>> 403:             else if (language.equals("no") && region.equals("NO") && 
>> variant.equals("NY")) {
>> 404:                 // no_NO_NY is a valid locale and used by Java 6 or 
>> older versions.
>> 405:                 // The build ignores the variant "NY" and change the 
>> language to "nn".
> 
> Nit: typo: "build" -> "builder", "change" -> "changes"

Fixed. 

Separately, I wanted to follow up on the `no_NO_NY` case handling. We currently 
have the following behavior,


jshell> var loc = Locale.forLanguageTag("no-Latn-NO-x-lvariant-NY")
loc ==> no_NO_NY_#Latn

jshell> var tag = loc.toLanguageTag()
tag ==> "nn-Latn-NO"


That is, `forLanguageTag` will provide compatibility support for this case, 
even if a script is present. I presume we will want to fix that there as well?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31728#discussion_r3508258921

Reply via email to