[jdk17u-dev] RFR: 8273369: Computing micros between two instants unexpectedly overflows for some cases
Paul Hohensee
phh at openjdk.org
Tue Nov 18 16:31:44 UTC 2025
On Thu, 13 Nov 2025 17:37:21 GMT, Roland Mesde <duke at openjdk.org> wrote:
> Backporting JDK-8273369: Computing micros between two instants unexpectedly overflows for some cases. Avoids overflow by not calling nanosUntil() directly, which will overflow beyond Long.MAX_VALUE difference in nano unit.
>
> Ran GHA Sanity Checks (passed) and related test (passed).
The source of the merge conflict in Instant.java is changing to a switch expression, which we don't want to do here. Please leave it as is, and patch the original switch instead.
-------------
Changes requested by phh (Reviewer).
PR Review: https://git.openjdk.org/jdk17u-dev/pull/4181#pullrequestreview-3478693794
More information about the jdk-updates-dev
mailing list