<i18n dev> RFR: JDK-7061097: [Doc] Inconsistenency between the spec and the implementation for DateFormat.Field

Naoto Sato naoto at openjdk.org
Thu Oct 19 23:01:27 UTC 2023


On Thu, 19 Oct 2023 21:31:13 GMT, Justin Lu <jlu at openjdk.org> 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.

Marked as reviewed by naoto (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/16279#pullrequestreview-1688819904


More information about the i18n-dev mailing list