[jdk21u-dev] RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

Roland Mesde duke at openjdk.org
Tue Dec 2 16:59:35 UTC 2025


On Tue, 18 Nov 2025 23:05:13 GMT, Roland Mesde <duke at openjdk.org> wrote:

>> Backporting JDK-8331485: Odd Results when Parsing Scientific Notation with Large Exponent.
>> 
>> Problem: DecimalFormat incorrectly parses strings with very large exponents:
>> 
>> - Exponents > Integer.MAX_VALUE return 0.0
>> - Exponents > Long.MAX_VALUE return the mantissa value
>> 
>> Fix: DecimalFormat.parse() now returns Double.POSITIVE_INFINITY for very large exponents, matching Double.parseDouble() behavior.
>> 
>> Impact: Eliminates edge case bug and provides consistent parsing behavior across Java's number parsing APIs.
>> 
>> Ran GHA Sanity Checks (passed) and related test (passed).
>
> Roland Mesde has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed LenientParseTest.java that is part of JDK-8327640 (Large and Required CSR)

Withdrawing and cancelling PR.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2481#issuecomment-3603045529


More information about the jdk-updates-dev mailing list