<i18n dev> RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v3]
Shaojin Wen
swen at openjdk.org
Sun Sep 14 04:59:18 UTC 2025
On Fri, 12 Sep 2025 22:44:54 GMT, Johannes Graham <duke at openjdk.org> wrote:
>> When formatting doubles or BigDecimals, DigitList first formats them as a string and then parses the resultant string to extract the mantissa and the exponent. This can be done more directly. This allows removing some parsing code and removes a cached byte array.
>>
>> This also facilitates potential cleanups in FloatingDecimal (removal of getChars method) but I've left that for later to minimize conflicts with other changes there.
>
> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision:
>
> VALUES_SIZE
src/java.base/share/classes/java/text/DigitList.java line 732:
> 730:
> 731: // The digit part of -9223372036854775808L
> 732: private static final byte[] LONG_MIN_REP = "9223372036854775808".getBytes(StandardCharsets.ISO_8859_1);
add `@Stable` here
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27118#discussion_r2347120493
More information about the i18n-dev
mailing list