-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b50
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084478 | emb-9 | Roger Riggs | P3 | Resolved | Fixed | team |
The spec for the java.time.chrono.JapaneseChronology.eraOf() asserts that DateTimeException is expected if eraValue is invalid.
https://docs.oracle.com/javase/8/docs/api/java/time/chrono/JapaneseChronology.html#eraOf-int-
but in the case of input value Integer.MAX_VALUE: JapaneseChronology.INSTANCE.eraOf(Integer.MAX_VALUE);
the method throws unexpected java.lang.ArrayIndexOutOfBoundsException:
java.lang.ArrayIndexOutOfBoundsException: -2147483648
at java.time.chrono.JapaneseEra.of(JapaneseEra.java:201)
at java.time.chrono.JapaneseChronology.eraOf(JapaneseChronology.java:377)
at java.time.chrono.JapaneseChronology.eraOf(JapaneseChronology.java:123)
Due to this issue the following test will fail after integration:
api/java_time/chrono/JapaneseChronology/index.html#eraOf
https://docs.oracle.com/javase/8/docs/api/java/time/chrono/JapaneseChronology.html#eraOf-int-
but in the case of input value Integer.MAX_VALUE: JapaneseChronology.INSTANCE.eraOf(Integer.MAX_VALUE);
the method throws unexpected java.lang.ArrayIndexOutOfBoundsException:
java.lang.ArrayIndexOutOfBoundsException: -2147483648
at java.time.chrono.JapaneseEra.of(JapaneseEra.java:201)
at java.time.chrono.JapaneseChronology.eraOf(JapaneseChronology.java:377)
at java.time.chrono.JapaneseChronology.eraOf(JapaneseChronology.java:123)
Due to this issue the following test will fail after integration:
api/java_time/chrono/JapaneseChronology/index.html#eraOf
- backported by
-
JDK-8084478 ArrayIndexOutOfBoundsException instead of DateTimeException in j.t.chrono.JapaneseChronology.eraOf()
-
- Resolved
-