On Thu, 19 Oct 2023 21:31:13 GMT, Justin Lu <[email protected]> wrote:

> Please review this PR which adjusts the specification of 
> `DateFormat.Field::getCalendarField` to conform to the implementation.
> 
> `getCalendarField()` claims that it will return -1 if there is no 
> corresponding `Calendar` constant.
> 
> Although the built-in DateFormat.Fields with no associated `Calendar` 
> constant are created with a `calendarField` equal to -1, a subclass can 
> create a DateFormat.Field with no associated `Calendar` constant with 
> `calendarField` equal to anything.
> 
> The specification of `getCalendarField()` should be adjusted to reflect this. 
> That is, a separate implementation may or may not return -1 if there is no 
> associated `Calendar` constant.

This pull request has now been integrated.

Changeset: 4dfa3799
Author:    Justin Lu <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/4dfa3799a60cb11092b699db5bc0cc1f44d24484
Stats:     6 lines in 1 file changed: 3 ins; 0 del; 3 mod

7061097: [Doc] Inconsistenency between the spec and the implementation for 
DateFormat.Field

Reviewed-by: naoto

-------------

PR: https://git.openjdk.org/jdk/pull/16279

Reply via email to