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. This pull request has now been integrated. Changeset: 174c1a6d Author: Justin Lu <j...@openjdk.org> Committer: Naoto Sato <na...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/174c1a6d53d3ea95649a511f4088c7807d80b59b Stats: 20 lines in 1 file changed: 13 ins; 5 del; 2 mod 4737887: (cal) API: Calendar methods taking field should document exceptions Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/13234