<i18n dev> RFR: 8363972: Loose matching of dash/minusSign in number parsing [v7]
Justin Lu
jlu at openjdk.org
Wed Aug 6 19:02:53 UTC 2025
On Tue, 5 Aug 2025 22:51:39 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> src/java.base/share/classes/java/text/DecimalFormatSymbols.java line 852:
>>
>>> 850:
>>> 851: // Lenient minus signs
>>> 852: lenientMinusSigns = numberElements.length < 14 ? minusSignText : numberElements[13];
>>
>> BTW, if I remove this check and always assign to `numberElements[13]`, I do not observe any failures in the java_text/Format suite. It would be nice to have an idea of why this check is needed. (I understand it is following the same length checks of monetarySeparator and monetaryGroupingSeparator.)
>
> The FALLBACK locale provider does not provide those elements, so the check is needed. Some tests in java/sun.util tests that specify HOST provider would fail without it.
I did not check that test suite, thanks that's good to know.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26580#discussion_r2258008674
More information about the i18n-dev
mailing list