On Wed, 8 Jul 2026 18:22:36 GMT, Justin Lu <[email protected]> wrote:

>> Justin Lu has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Address other areas + narrow matching to exact matches only
>
> src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java
>  line 376:
> 
>> 374:                 // Extensions can exist while variant is ill-formed
>> 375:                 // Simply strip the extensions so that all fields are 
>> preserved
>> 376:                 lookupLocale = lookupLocale.stripExtensions();
> 
> The old comment was wrong, it was entirely possible for a locale to have 
> non-empty extensions with ill-formed variant. For example, 
> `"en-Latn-US-a-foo-x-lvariant-xy"` and this catch block is entirely possible. 
> I think stripping the extension is a better solution than trying to 
> reconstruct with the `of` factory since the script is retained.

Although chances are slim, technically this is a behavioral change. Maybe it is 
worth describing this in the CSR

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

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

Reply via email to