Duration.MAX_VALUE

Pavel Rappo pavel.rappo at gmail.com
Wed Sep 3 17:53:19 UTC 2025


If I understood you correctly, you think we should also add
Duration.MIN. If so, what use case do you envision for it? Or we add
if purely for symmetry with Instant?

On Wed, Sep 3, 2025 at 6:43 PM Pavel Rappo <pavel.rappo at gmail.com> wrote:
>
> On Wed, Sep 3, 2025 at 6:06 PM Stephen Colebourne <scolebourne at joda.org> wrote:
> >
> > Hmm, yes. Not sure why that didn't get added in Java 8!
> > The constants would be MAX/MIN as per classes like Instant.
> > Stephen
>
> I thought that naming could be tricky :) The public constant
> Duration.ZERO and the public method isZero() are already there.
> However, it does not preclude us from naming a new constant MAX.


More information about the core-libs-dev mailing list