<i18n dev> RFR: 8366829: Add java.time.Duration constants MIN and MAX [v3]
Roger Riggs
rriggs at openjdk.org
Wed Oct 8 20:16:25 UTC 2025
On Fri, 3 Oct 2025 09:50:23 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> We have [recently discussed][] a possibility of adding the `Duration.MIN` and `Duration.MAX` constants. Can we now start implementation? If and when we are in agreement on this PR, I will file a CSR.
>>
>> I drafted a minimal specification and added some tests. I tried to phrase the spec for `Duration.MIN` in a way that makes it clear that `Duration.MIN` is the most negative value and not the least positive.
>>
>> [recently discussed]: https://mail.openjdk.org/pipermail/core-libs-dev/2025-September/151098.html
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Respond to feedback
>
> Apply Stephen's suggestion on wording, although modified.
As proposed. Duration.MAX() is not the negated value of Duration.MIN.
Is there any value for them to have that mathematical property?
Duration.MIN can not be negated, it throws "Exceeds capacity of Duration".
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27534#issuecomment-3383068470
More information about the i18n-dev
mailing list