RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

Martin Buchholz martinrb at google.com
Tue Feb 2 06:55:51 UTC 2016

On Mon, Feb 1, 2016 at 10:19 PM, Tagir F. Valeev <amaembo at gmail.com> wrote:

> I have a doubt about replacing rangeCheckForAdd. What if size() ==
> Integer.MAX_VALUE? This is not an issue for ArrayList as it's limited
> by MAX_ARRAY_SIZE which is Integer.MAX_VALUE - 8.

Actually, the limit is Integer.MAX_VALUE.  But it only grows beyond
MAX_ARRAY_SIZE if there's no choice.

More information about the core-libs-dev mailing list