Bug in ArrayList iterator

Stanislav Baiduzhyi sbaiduzh at redhat.com
Wed Jan 7 12:03:15 UTC 2015

On Wednesday 07 January 2015 12:02:42 Chris Hegarty wrote:
> > Yes, but that exactly how it works now, that's why second invocation of
> > hasNext() returns false and we can see the issue Remi is talking about. If
> > hasNext() will be throwing ConcurrentModification than will work as early
> > warning system that something is wrong with this iterator.
> The changes in the patch I suggested will change existing behavior. In
> Remi's case, hasNext() will now return true, and next() will throw CME.

That's correct, yes, sorry, missed the idea. That's actually good solution, 
much better than throwing CME from hasNext().


More information about the core-libs-dev mailing list