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

Use Locale.ENGLISH to do proper toLower/UpperCase #48

Closed
wants to merge 17 commits into from
Closed

Use Locale.ENGLISH to do proper toLower/UpperCase #48

wants to merge 17 commits into from

Conversation

SvetlinZarev
Copy link
Contributor

In several places TomEE does not use proper toLower()/toUpper(). The issue is that if the server relies on the default locale and if the process was started with some non English compatible locale such as Turkish, toUpper/Lower will yield an incorrect result. For instance "URI".toLowerCase() will result in "urı" instead of "uri". The same applies to toUpperCase -> "uri".toUpperCase() will become "URİ" and checks like "string.toUpperCase().equals(someConstant)" will fail.

In some places I left the usage of the default locale, because IMO using a fixed locale is equally incorrect. Those places are:
MultivaluedMap:144
ProviderManager:78
DeploymentResolver:186/464
ConfigurationFactory:1554
BasicURLClassPath:83
ActiveMQ5Factory:409

Bug: https://issues.apache.org/jira/browse/TOMEE-1946

@asfgit asfgit closed this in 7b86681 Sep 27, 2016
@SvetlinZarev SvetlinZarev deleted the locale_1 branch September 27, 2016 12:47
jgallimore added a commit to jgallimore/tomee that referenced this pull request Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant