RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

Jason Mehrens jason_mehrens at hotmail.com
Tue Jan 26 13:44:57 UTC 2016

Hi Martin,

Are you sure about the change where addElement is now calling the public (non-final) version of add?  I would think that we would want to avoid any type of compatibility changes with regard to Vector.


From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> on behalf of Martin Buchholz <martinrb at google.com>
Sent: Monday, January 25, 2016 6:49 PM
To: Stuart Marks
Cc: core-libs-dev
Subject: Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

I already regret touching crufty old Vector, but it had the same bug
to fix, and more surprisingly the same sort of performance improvement
from doing the obvious port.  So ... Stuart, please review also


On Fri, Jan 22, 2016 at 2:30 PM, Stuart Marks <stuart.marks at oracle.com> wrote:
> On 1/22/16 12:02 PM, Martin Buchholz wrote:
>> I went "by the book" as you suggested and now throw
>> InvalidObjectException when size < 0.
>> (But I've been saying for a decade: if we're serious about
>> Serialization, it needs to be someone's full time job)
> "Admiral, if we go by the book, years could turn into decades."
> Thanks for the update; this looks great to me.
> s'marks

More information about the core-libs-dev mailing list