<i18n dev> RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v2]
Roger Riggs
rriggs at openjdk.org
Tue Apr 9 13:48:05 UTC 2024
On Tue, 9 Apr 2024 08:34:39 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Should `INSTANT_SECONDS("InstantSeconds", SECONDS, FOREVER, ValueRange.of(Instant.MIN.getEpochSecond(), Instant.MAX.getEpochSecond())),
>> ` work?
>
> Hello Naoto, that's a very good point. I was too caught up with the constant values that it didn't occur to me that the `Instant.MIN` and `Instant.MAX` public fields could be used for this. I have followed your suggestion and updated the PR. I have also updated the javadoc to link to `Instant.MIN` and `Instant.MAX` as the supported epoch second range.
>
> The test continues to pass with this change and fails (as expected) without the source change.
Good, that was going to be my backup suggestion; trying to avoid a method call even for the init. :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18674#discussion_r1557657347
More information about the i18n-dev
mailing list