RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't
Eamonn McManus
emcmanus at openjdk.org
Fri Apr 7 15:32:43 UTC 2023
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus <emcmanus at openjdk.org> wrote:
> Instant.ofEpochMilli says this:
>
>
> @throws DateTimeException if the instant exceeds the maximum or minimum instant
>
>
> But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it does not throw. That's already implicitly tested in [`TestInstant`](https://github.com/openjdk/jdk/blob/a9dba565688a29bef8626488c47519008dcadbe8/test/jdk/java/time/test/java/time/TestInstant.java#L84), which calls it with both those values.
What do I need to do to help the CSR [JDK-8303926](https://bugs.openjdk.org/browse/JDK-8303926) progress?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12958#issuecomment-1500390622
More information about the core-libs-dev
mailing list