RFR: 8079136: Accessing a nested sublist leads to StackOverflowError
Tagir F. Valeev
amaembo at gmail.com
Wed Mar 30 09:03:55 UTC 2016
IG> After the fix for JDK-8148748 went in, I needed to rebase the fix.
IG> Comparing to the previous webrev, the changes are local to
IG> The builds/tests are green.
Looks good to me, thanks.
By the way I just noted that Paul pushed not the latest patch I
prepared for 8148748. There are purely cosmetic differences missing:
Couple of explanation comments here
(lines 1285, 1286, 1303)
Additional test in SpliteratorTraversingAndSplittingTest:
These changes were suggested by Paul here:
I don't know what's better alternative here:
1. Drop these changes as they are not very important.
2. Log a separate issue for them.
3. Ask Ivan to add them to 8079136 (at least comments) as they belong
to the same class.
What do you think?
With best regards,
IG> With kind regards,
IG> On 03.02.2016 22:16, Ivan Gerasimov wrote:
>> Here's the updated webrev with rangeCheckForAdd() restored in both
>> AbstractList and ArrayList.
>> The fix was built/tested successfully on all supported platforms.
>> Sincerely yours,
>> On 02.02.2016 9:55, Martin Buchholz wrote:
>>> On Mon, Feb 1, 2016 at 10:19 PM, Tagir F. Valeev <amaembo at gmail.com>
>>>> 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