RFR 8235699 : ArrayIndexOutOfBoundsException in CalendarBuilder.toString
Verghese, Clive
verghese at amazon.com
Tue Dec 31 16:54:33 UTC 2019
Hi Volker,
Thank you for reviewing the changes and approving.
It would be great if you could sponsor the change as well.
Regards,
Clive Verghese
From: Volker Simonis <volker.simonis at gmail.com>
Date: Monday, December 30, 2019 at 3:13 PM
To: "Verghese, Clive" <verghese at amazon.com>
Cc: Java Core Libs <core-libs-dev at openjdk.java.net>
Subject: Re: RFR 8235699 : ArrayIndexOutOfBoundsException in CalendarBuilder.toString
Hi Clive,
thanks for updating the patch.
Looks good now.
Do you need a sponsor for pushing?
Best regards,
Volker
Verghese, Clive <verghese at amazon.com<mailto:verghese at amazon.com>> schrieb am Di., 17. Dez. 2019, 04:50:
Hi Volker,
Thank you for the feedback.
I have update the revision to reflect your comments.
http://cr.openjdk.java.net/~phh/8235699/webrev.01/
Regards,
Clive Verghese
On 12/13/19, 8:09 AM, "Volker Simonis" <volker.simonis at gmail.com<mailto:volker.simonis at gmail.com>> wrote:
Hi Clive,
nice catch :)
I think it would be better though to only iterate up to MAX_FIELD and
print "field[MAX_FIELD + i]", otherwise you may miss to print valid
fields. The reason is that with your current solution "isSet()" will
now be called not only for "stamp" fields, but also for "real" fields.
But for "real" fields, zero is a valid value which you might want to
print. You might however still consider printing the "stamps" (i.e.
the lower half) as well, e.g.:
sj.add(i + "=" + field[i] + ":" + field[MAX_FIELD + i]);
Thank you and best regards,
Volker
On Fri, Dec 13, 2019 at 1:05 AM Verghese, Clive <verghese at amazon.com<mailto:verghese at amazon.com>> wrote:
>
> 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.
>
> Regards,
> Clive Verghese
>
> From: "Verghese, Clive" <verghese at amazon.com<mailto:verghese at amazon.com>>
> Date: Thursday, December 12, 2019 at 2:07 PM
> To: "core-libs-dev at openjdk.java.net<mailto:core-libs-dev at openjdk.java.net>" <core-libs-dev at openjdk.java.net<mailto:core-libs-dev at openjdk.java.net>>
> Subject: RFR 8235699 : ArrayIndexOutOfBoundsException in CalendarBuilder.toString
>
> Hi,
>
> 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.
>
> Regards,
> Clive Verghese
>
>
More information about the core-libs-dev
mailing list