Draft: Deprecate toLowerCase()/toUpperCase() and provide locale insensitive alternative
Glavo
zjx001202 at gmail.com
Sat Apr 15 07:50:19 UTC 2023
Hi Alan,
In discussions with others, my thoughts have changed.
I describe the issue in more detail[1] and have a new plan:
1. Add new locale insensitive APIs and recommend users to use them in new
> code.
>
> I hope this step can be implemented in Java 21.
>
> 2. Add a new system property that allows users to configure the behavior of
> these two methods.
>
> 3. Gradually clean up the use cases inside JDK.
>
> Since this involves a dozen modules and hundreds of source files, I
> need to
> split them into many PRs, and some of them require CSR. Reviewing them
> may
> take a long time, this step will be done slowly in the future.
>
> 4. Deprecate the two methods.
>
> This step may take place much later.
>
I hope to prioritize the first step now, at least introducing a new clean
API in Java 21.
Do you have any opinions on this plan?
Glavo
[1] https://mail.openjdk.org/pipermail/core-libs-dev/2023-April/104118.html
On Sat, Apr 15, 2023 at 3:04 PM Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 13/04/2023 15:58, Glavo wrote:
> > :
> >
> > I thought it might be more efficient to discuss after creating a draft
> PR.
> > It seems that it is difficult to attract more experts to participate
> > in the
> > discussion only on the mailing list. Do you have any suggestions for
> this?
> >
>
> This proposal is not something to be hurried. It could be massively
> disruptive change and would need to be looked at in the context of all
> APIs that use the default locale. It would also need to be looked at in
> the context of new developers starting out and just wanting to get a toy
> program working. It might be confusing for new developers to find
> themselves using a neutral locale. If a new developer is forced to
> choose between Locale.ROOT and Locale.getDefault() during their first
> week of coding then it will give a terrible first impression.
>
> One of your messages lists cleaning up usages in the JDK. Auditing the
> usages to identify any cases that should be changed from using the
> default locale to Locale.ROOT would be a contribution. So if you have
> the energy to do that they it would be useful to start.
>
> -Alan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20230415/725f4678/attachment-0001.htm>
More information about the core-libs-dev
mailing list