Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix locale-dependent toLowerCase()/toUpperCase() calls #1281

Closed
ppkarwasz opened this issue Feb 21, 2023 · 5 comments
Closed

Fix locale-dependent toLowerCase()/toUpperCase() calls #1281

ppkarwasz opened this issue Feb 21, 2023 · 5 comments
Assignees
Labels
bug Incorrect, unexpected, or unintended behavior of existing code good first issue Issues that are good for contributors looking to get started
Milestone

Comments

@ppkarwasz
Copy link
Contributor

ppkarwasz commented Feb 21, 2023

Log4j2 has a couple of remaining call sites of String#toLowerCase and String#toUpperCase, which are locale-dependent. These calls should be replaced with Strings#toRootLowerCase and Strings#toRootUpperCase.

Such a call is present for example in PluginManager, which causes IfLastModified to be transformed to ıflastmodified (with a dotless i), if the locale is Turkish (cf. this SO question).

@ppkarwasz ppkarwasz added the bug Incorrect, unexpected, or unintended behavior of existing code label Feb 21, 2023
@ppkarwasz ppkarwasz added this to the 2.20.1 milestone Feb 21, 2023
@ppkarwasz ppkarwasz added the good first issue Issues that are good for contributors looking to get started label Feb 21, 2023
@ppkarwasz
Copy link
Contributor Author

I think this can be a good first issue: there are already helper methods Strings#toRootLowerCase and Strings#toRootUpperCase.

@akashshirale14
Copy link

Can you assign this issue to me?

@ppkarwasz
Copy link
Contributor Author

@akashshirale14,

Done. I also updated the issue description: we already have methods Strings#toRootLowerCase/toRootUpperCase that sound less English-centric and do the same thing.

@awadammar
Copy link
Contributor

awadammar commented May 15, 2023

Hello, @akashshirale14
Are you still working on this issue? If you're not, I'm interested to work on it.

@akashshirale14
Copy link

akashshirale14 commented May 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect, unexpected, or unintended behavior of existing code good first issue Issues that are good for contributors looking to get started
Projects
None yet
Development

No branches or pull requests

3 participants