On Wed, 29 Mar 2023 22:04:08 GMT, Justin Lu <j...@openjdk.org> wrote:
> Many Calendar methods that take in a field parameter should document that > they throw an ArrayIndexOutOfBoundsException if field is not between 0 and > `Calendar.FIELD_COUNT`. > > This PR adds a clause to the class description to make the above apparent. > > `Calendar.Roll(int, int)`, `Calendar.roll(int, boolean)`, and > `Calendar.add(int, int)` should all be documented that they throw an > `IllegalArgumentException` if any calendar fields have out-of-range values in > non-lenient mode or if field is > `Calendar.ZONE_OFFSET`, `Calendar.DST_OFFSET`, or unknown. Looks good, Justin. Nit: copyright year -> 2023 ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/13234#pullrequestreview-1386182763