Skip to content

Add missing Locale.ENGLISH #2326

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

Merged
merged 1 commit into from
Aug 26, 2021
Merged

Conversation

Fudeveloper
Copy link
Contributor

@Fudeveloper Fudeveloper commented Aug 26, 2021

it will cause some hard-to-find problems.

bug reproduction:

Locale trLocale= Locale.forLanguageTag("tr-TR");
String columnName = "i_test";
String columnPrefix = "I_";

System.out.println(columnName.toUpperCase(Locale.ENGLISH));
System.out.println(columnName.toUpperCase(trLocale));
System.out.println(columnName.toUpperCase(Locale.ENGLISH).startsWith(columnPrefix.toUpperCase(Locale.ENGLISH)));
System.out.println(columnName.toUpperCase(trLocale).startsWith(columnPrefix.toUpperCase(trLocale)));

result:

I_TEST
İ_TEST
true
false

As shown in the figure, the 'String#toUpperCase' method has been used 23 times.

image

21 times with the parameter of i18n(Locale.ENGLISH).
image

The special two times are added in this commit.
image

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 87.342% when pulling e6ac866 on Fudeveloper:add-missing-locale into e04cb74 on mybatis:master.

@hazendaz
Copy link
Member

Good catch! Thanks.

@hazendaz hazendaz merged commit 5fca451 into mybatis:master Aug 26, 2021
@kazuki43zoo kazuki43zoo added this to the 3.5.8 milestone Dec 11, 2021
@kazuki43zoo kazuki43zoo added the polishing Improve a implementation code or doc without change in current behavior/content label Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polishing Improve a implementation code or doc without change in current behavior/content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants