<i18n dev> RFR: 8363972: Loose matching of dash/minusSign in number parsing [v6]

Naoto Sato naoto at openjdk.org
Mon Aug 4 23:57:30 UTC 2025


On Mon, 4 Aug 2025 17:58:29 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>> 
>>  - Merge branch 'master' into JDK-8363972-Loose-matching-dash
>>  - Spec update
>>  - Supplementary/CanonEq tests
>>  - flipped again, which was correct
>>  - flipped the size check
>>  - Address review comments
>>  - Merge branch 'master' into JDK-8363972-Loose-matching-dash
>>  - tidying up
>>  - test location
>>  - spec update
>>  - ... and 6 more: https://git.openjdk.org/jdk/compare/8e921aee...3682484d
>
> src/java.base/share/classes/java/text/DecimalFormat.java line 3522:
> 
>> 3520:         if (alen == 0) {
>> 3521:             return true;
>> 3522:         }
> 
> This seems suspect, a zero length affix seems like an error. And if there is an empty affix, subsequent code should not be doing replacement.

This is expected. Since prefix/suffix in the format patterns are optional, empty prefix/suffix should match the text.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26580#discussion_r2252809269


More information about the i18n-dev mailing list