RFR 8234423 : Modifying ArrayList.subList().subList() resets modCount of subList

Ivan Gerasimov ivan.gerasimov at oracle.com
Fri Jan 10 00:20:17 UTC 2020


Thank you Roger for your review!

Happy New Year to you too! :)

With kind regards,

Ivan

On 1/9/20 10:36 AM, Roger Riggs wrote:
> Hi Ivan,
>
> Happy New Year!
>
> This change looks fine.
>
> Roger
>
>
> On 11/23/19 2:30 AM, Ivan Gerasimov wrote:
>> Re-sending the request with the correct Subject line - the bug is not 
>> (only) about the iterator.
>>
>>
>> On 11/20/19 10:11 PM, Ivan Gerasimov wrote:
>>> Hello!
>>>
>>> When a sublist of a sublist of an ArrayList is created, its modCount 
>>> is initialized from the ArrayList root, and not from its immediate 
>>> parent.
>>>
>>> This means that modifying that 2nd level sublist will reset 
>>> modCounts of the entire chain up to the root, and consequently the 
>>> 1st level sublist won't detect concurrent modification done to the 
>>> ArrayList root.
>>>
>>> Along with the fix, handling of modCount is slightly improved in a 
>>> few other places.
>>>
>>> Would you please help review the fix?
>>>
>>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8234423
>>> WEBREV: http://cr.openjdk.java.net/~igerasim/8234423/00/webrev/
>>>
>
-- 
With kind regards,
Ivan Gerasimov



More information about the core-libs-dev mailing list