[jdk21u-dev] RFR: 8371652: Double.parseDouble with large strings fails
Raffaello Giulietti
rgiulietti at openjdk.org
Thu Nov 27 10:11:59 UTC 2025
On Thu, 27 Nov 2025 02:32:13 GMT, Lei Zhu <duke at openjdk.org> wrote:
> Hi all,
>
> This pull request is the backport of [JDK-8343829](https://bugs.openjdk.org/browse/JDK-8343829)
>
> Please review this code.
>
> Thanks!
test/jdk/java/lang/Double/ParseLargeStrings.java line 27:
> 25: * @test
> 26: * @bug 8371652
> 27: * @summary Double.parseDouble with large strings should return Double Infinity
Large strings can return _any_ `double`, not only infinity.
Think of 1 billions `' '` (or `'0'`) followed by a `'1'`, which returns `1.0`.
Or 1 billion `'9'` followed by `e-10000000000000000000`, which returns `0.0`.
And so on.
-------------
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/2488#discussion_r2567902931
More information about the jdk-updates-dev
mailing list