On Thu, 16 Jul 2026 23:51:27 GMT, Naoto Sato <[email protected]> wrote:

>> Update the lowercasing logic for Greek capital sigma to use the 
>> "Final_Sigma" condition. The current implementation still uses the 
>> "Final_Cased" condition from Unicode 4.0.
>> 
>> This change also generates the `ConditionalSpecialCasing` entries and 
>> Unicode-property predicates from the UCD, replacing manually maintained data 
>> that was incomplete and out of date.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Naoto Sato has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Made the non-conditional case explicit by setting it to "NONE"

Updates to Final_Sigma and associated cleanup to derive from UCD files looks 
good overall to me.

make/jdk/src/classes/build/tools/generatespecialcasing/GenerateSpecialCasing.java
 line 49:

> 47: public class GenerateSpecialCasing {
> 48:     // Record for a code point that holds the conditional special casing
> 49:     private static record Entry(String codePoint, List<String> lowerCase, 
> List<String> upperCase, String language, String condition) {};

Could briefly mention that `language` is nullable, which indicates that the 
entry mapping is locale-independent.

src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java.template 
line 349:

> 347:     }
> 348: 
> 349:     private static boolean isSoftDotted(int cp) {

Similar to `isCased` and `isCaseIgnorable`, specify which UCD file the 
Soft_Dotted property values are derived from?

test/jdk/java/lang/String/ToLowerCase.java line 53:

> 51: 
> 52:         // Final_Cased (Unicode 4.0) -> Final_Sigma (Unicode 5.0) 
> specific tests
> 53:         test("A:\u03A3", Locale.US, "a:\u03C2");

Might be nice to describe the conditions which are dictating the final/media 
sigma as brief comments for future readers, because the escape sequence form 
makes it hard at a first glance.

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

Marked as reviewed by jlu (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31937#pullrequestreview-4725253749
PR Review Comment: https://git.openjdk.org/jdk/pull/31937#discussion_r3605458216
PR Review Comment: https://git.openjdk.org/jdk/pull/31937#discussion_r3605405032
PR Review Comment: https://git.openjdk.org/jdk/pull/31937#discussion_r3605430156

Reply via email to