<i18n dev> RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v2]
Jaikiran Pai
jpai at openjdk.org
Tue Apr 9 08:37:29 UTC 2024
> Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8212895?
>
> As noted in that issue, the `ChronoField.INSTANT_SECONDS` currently is initialized to have a minimum and maximum values of `Long.MIN_VALUE` and `LONG.MAX_VALUE` respectively. However, `java.time.Instant` only supports `-31557014167219200L` and `31556889864403199L` as minimum and maximum values for the epoch second.
>
> The commit in this PR updates the `ChronoField.INSTANT_SECONDS`'s value range to match the supported min and max values of `Instant` (as suggested by Stephen in that JBS issue). This commit also introduces a test to verify this change. This new test method as well as existing tests in tier1, tier2 and tier3 continue to pass with this change.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
Naoto's suggestion - use Instant.MIN and Instant.MAX instead of hardcoded values
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18674/files
- new: https://git.openjdk.org/jdk/pull/18674/files/1fea0f71..6e535779
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18674&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18674&range=00-01
Stats: 5 lines in 1 file changed: 3 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/18674.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18674/head:pull/18674
PR: https://git.openjdk.org/jdk/pull/18674
More information about the i18n-dev
mailing list