[jdk21u-dev] Withdrawn: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent
Roland Mesde
duke at openjdk.org
Tue Dec 2 16:59:37 UTC 2025
On Mon, 17 Nov 2025 18:21:06 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).
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk21u-dev/pull/2481
More information about the jdk-updates-dev
mailing list