<i18n dev> RFR: 8263677: Improve Character.isLowerCase/isUpperCase lookups

Claes Redestad redestad at openjdk.java.net
Tue Mar 16 19:48:18 UTC 2021

This patch changes the otherLowercase / otherUppercase bits to be set if either the codepoint is of type LOWERCASE_LETTER and UPPERCASE_LETTER, or the Unicode Other_Lowercase / Other_Uppercase property is set. This simplifies the lookup in Character.isLowerCase/isUpperCase to a single table lookup, which appears to be healthy for performance.

I also took the opportunity to clean up the somewhat dated GenerateCharacter utility class.

Testing: tier1-3


Commit messages:
 - Merge branch 'master' into character_case
 - Cleanups and modernizations
 - Fix lookup in 00, 01, 0E planes
 - Widen the range of codepoints tested by Characters micro
 - Improve Character.isLowerCase/isUpperCase lookups

Changes: https://git.openjdk.java.net/jdk/pull/3028/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3028&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263677
  Stats: 261 lines in 8 files changed: 13 ins; 129 del; 119 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3028.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3028/head:pull/3028

PR: https://git.openjdk.java.net/jdk/pull/3028

More information about the i18n-dev mailing list