On Mon, 18 Sep 2023 03:00:25 GMT, Chen Liang <li...@openjdk.org> wrote:

>> 温绍锦 has updated the pull request with a new target base due to a merge or a 
>> rebase. The incremental webrev excludes the unrelated changes brought in by 
>> the merge/rebase. The pull request contains ten additional commits since the 
>> last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into 
>> optimization_for_string_latin1_upper_lower
>>  - Merge branch 'master' into optimization_for_string_latin1_upper_lower
>>  - Merge branch 'master' of github.com:wenshao/jdk into 
>> optimization_for_string_latin1_upper_lower
>>  - rename hasNotUpperCaseEx to hasUpperCaseMapping
>>  - rename isLowerCaseEx to hasNotUpperCaseEx
>>  - use hex literal
>>  - add method CharacterDataLatin1#isLowerCaseEx
>>  - remove unnecessary code
>>  - optimization for StringLatin1 UpperLower
>
> src/java.base/share/classes/java/lang/CharacterDataLatin1.java.template line 
> 93:
> 
>> 91:     }
>> 92: 
>> 93:     boolean hasUpperCaseMapping(int ch) {
> 
> This method is incorrectly named; it actually tests that a char has no upper 
> case mapping. I recommend fixing this by keeping the method name while 
> removing the double `!` at this return and at the if down below to simplify 
> the logic.

I'd have preferred @liach's solution (remove the double negative and keeping 
the method with name unchanged) but this is OK too.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14751#discussion_r1328567080

Reply via email to