RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList
Claes Redestad
claes.redestad at oracle.com
Mon May 14 13:37:49 UTC 2018
Hi Ivan,
right, checkForComodification() alone should be sufficient here.
Updated in-place: http://cr.openjdk.java.net/~redestad/8196340/open.01/
Thanks!
/Claes
On 2018-05-12 03:38, Ivan Gerasimov wrote:
> Hi Claes!
>
> One thing I can't figure out is why both these two checks are necessary:
>
> 1303 checkForComodification();
> 1304 root.checkForComodification(expectedModCount);
>
> The former compares the current root.modCount with the one at the time
> this subList was created.
>
> The later one compares the current root.modCount with the one at the
> time the method was called.
>
> If the later fails, wouldn't it imply the former should also have failed?
>
>
> With kind regards,
>
> Ivan
More information about the core-libs-dev
mailing list