From 54acadbe668f6feced6eb9c28bcf46d1b3986eec Mon Sep 17 00:00:00 2001 From: Gautham Krishnan Date: Tue, 24 Jun 2025 14:53:14 +0000 Subject: [PATCH] 8294226: Document missing UnsupportedTemporalTypeException Reviewed-by: rriggs, naoto --- .../share/classes/java/time/chrono/ChronoLocalDate.java | 1 + .../share/classes/java/time/chrono/ChronoLocalDateTime.java | 6 +++++- .../share/classes/java/time/chrono/ChronoZonedDateTime.java | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java b/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java index 3aae065715a..59416403003 100644 --- a/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java +++ b/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java @@ -455,6 +455,7 @@ public interface ChronoLocalDate /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override diff --git a/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTime.java b/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTime.java index 73b3a1e8a88..8ed2f910525 100644 --- a/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTime.java +++ b/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -84,6 +84,7 @@ import java.time.temporal.TemporalField; import java.time.temporal.TemporalQueries; import java.time.temporal.TemporalQuery; import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.time.zone.ZoneRules; import java.util.Comparator; import java.util.Objects; @@ -276,6 +277,7 @@ public interface ChronoLocalDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override @@ -294,6 +296,7 @@ public interface ChronoLocalDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override @@ -312,6 +315,7 @@ public interface ChronoLocalDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override diff --git a/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTime.java b/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTime.java index 8892bc471b6..57f0bac4008 100644 --- a/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTime.java +++ b/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -422,6 +422,7 @@ public interface ChronoZonedDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override @@ -440,6 +441,7 @@ public interface ChronoZonedDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override @@ -458,6 +460,7 @@ public interface ChronoZonedDateTime /** * {@inheritDoc} * @throws DateTimeException {@inheritDoc} + * @throws UnsupportedTemporalTypeException {@inheritDoc} * @throws ArithmeticException {@inheritDoc} */ @Override