<i18n dev> RFR: 8187649: ArrayIndexOutOfBoundsException in java.util.JapaneseImperialCalendar

Roger Riggs rriggs at openjdk.java.net
Wed May 26 18:41:05 UTC 2021

On Tue, 25 May 2021 16:40:53 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Please review the fix. The issue was informed yesterday by @amaembo that it offends some code analysis tools.
> Although the fix is to change the condition error, it turned out that `JapaneseImperialCalendar.roll()` did not work for `WEEK_OF_MONTH` and `DAY_OF_MONTH`. There was an inherent issue where `GregorianCalendar` does not follow the `roll()` spec, i.e., "The MONTH must not change when the WEEK_OF_MONTH is rolled." during the Julian/Gregorian transition. JDK-6191841 seems to have tried to fix it but it was closed as `Future Project`...
> So I simply fixed the `roll()` issue in `JapaneseImperialCalendar` to follow the spec here, which seems to be the intent of the original author.

Marked as reviewed by rriggs (Reviewer).


PR: https://git.openjdk.java.net/jdk/pull/4191

More information about the i18n-dev mailing list