RFR 8235699 : ArrayIndexOutOfBoundsException in CalendarBuilder.toString

Verghese, Clive verghese at amazon.com
Fri Dec 13 00:05:03 UTC 2019

Additional information regarding the field array.

It is meant to hold two arrays, the lower half holds the stamp. And the upper half holds the fields.
The original implementation was intending to display the second half of the array. Though the outer loop
iterated through the whole array. Therefore causing an ArrayIndexOutOfBoundsException. I have updated
this to display the whole array.

Clive Verghese

From: "Verghese, Clive" <verghese at amazon.com>
Date: Thursday, December 12, 2019 at 2:07 PM
To: "core-libs-dev at openjdk.java.net" <core-libs-dev at openjdk.java.net>
Subject: RFR 8235699 : ArrayIndexOutOfBoundsException in CalendarBuilder.toString


Requesting review for
JBS Issue : https://bugs.openjdk.java.net/browse/JDK-8235699
Webrev :  https://cr.openjdk.java.net/~phh/8235699/webrev.00/

CalendarBuilder.toString method has a bug which causes an ArrayIndexOutOfBoundsException exception.
The class is an internal jdk class that is restricted to java.text package. The bug is observed when the debugger
reaches this class and uses the toString function to print the class.

Steps to reproduce this is attached in the JBS issue.

Clive Verghese

More information about the core-libs-dev mailing list