On Tue, 22 Sep 2026 17:34:23 GMT, Justin Lu <[email protected]> wrote:

>> createEpochMonths() used minYear in the invalid-month-length message.
>> Use the loop variable year.
>> 
>> HijrahConfigTest copies an invalid custom config and checks
>> the DateTimeException cause message names 1448.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.base/share/classes/java/time/chrono/HijrahChronology.java line 948:
> 
>> 946: 
>> 947:                 if (length < 29 || length > 32) {
>> 948:                     throw new IllegalArgumentException("Invalid month 
>> length in year: " + year);
> 
> An even better message would call out the month and month length, but it is 
> pretty trivial to identify those once the correct year is emitted, so it is 
> fine as is too.

Thanks. I'll update the message to include both the invalid length and the year.

> test/jdk/java/time/nonjunit/java/time/chrono/hijrah-config-Hijrah-invalid_islamic-invalid.properties
>  line 26:
> 
>> 24: # the actual Hijrah variants.
>> 25: 
>> 26: # Test-only custom chronology for JI-9080831.
> 
> This comment should refer to the JBS issue instead: JDK-8392848

Thanks, will update the comment to JDK-8392848.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33015#discussion_r4074745697
PR Review Comment: https://git.openjdk.org/jdk/pull/33015#discussion_r4074733846

Reply via email to