[Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default
    Naoto Sato 
    naoto.sato at oracle.com
       
    Fri Jan 27 17:24:38 UTC 2023
    
    
  
+1
Unfortunately, it would be too disruptive to change the decades old 
behavior.
Naoto
On 1/27/23 3:53 AM, Alan Bateman wrote:
> On 27/01/2023 05:42, Glavo wrote:
>> I analyzed the usage of toLowerCase and toUpperCase in OpenJDK more 
>> carefully,
>>  and found that none of the use cases really expected locale-sensitive 
>> behavior
> 
> I expected that as there were a number of passes over these use-sites 
> over the years. That said, if some of the remaining usages can be 
> changed to specify the locale then it would avoid others puzzling over 
> them too. Changing them probably needs careful review so changing them 
> in specific areas or in smaller batches would make it easier for 
> potential Reviewers.
> 
> In any case, I agree with Rémi that changing the existing methods is too 
> subtle and maybe it's time to look at no-arg replacements.
> 
> -Alan
    
    
More information about the core-libs-dev
mailing list