RFR: 8294226: Document missing UnsupportedTemporalTypeException
Naoto Sato
naoto at openjdk.org
Mon Jun 16 20:37:32 UTC 2025
On Mon, 16 Jun 2025 16:36:43 GMT, Gautham Krishnan <gkrishnan at openjdk.org> wrote:
> Some methods in the java.time.chrono interfaces—ChronoLocalDate, ChronoLocalDateTime, and ChronoZonedDateTime—override methods from the java.time.temporal.Temporal interface that are documented to throw UnsupportedTemporalTypeException when given unsupported fields or units.
>
> These overridden methods include:
>
> with(TemporalField, long)
>
> plus(long, TemporalUnit)
>
> minus(long, TemporalUnit)
>
> However, their Javadoc in the chrono interfaces does not mention the possibility of this exception, resulting in incomplete or inconsistent documentation. This contrasts with the parent Temporal interface, which explicitly documents the exception.
Marked as reviewed by naoto (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/25836#pullrequestreview-2933434612
More information about the core-libs-dev
mailing list