I just ran into this error:

java.util.ConcurrentModificationException
        at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
        at java.util.AbstractList$Itr.next(AbstractList.java:421)
        at
org.apache.commons.collections.CursorableLinkedList.broadcastListableInserte
d(Unknown Source)
        at
org.apache.commons.collections.CursorableLinkedList.insertListable(Unknown
Source)
        at
org.apache.commons.collections.CursorableLinkedList.addFirst(Unknown Source)
        at
org.apache.commons.pool.impl.GenericObjectPool.returnObject(Unknown Source)

Unfortunately, I do not have stack traces for the other threads that were
running, so I don't know what some other thread must have been doing to
cause this. But, looking at GenericObjectPool, it appears to be properly
synchronized at all the places that operate on the CursorableLinkedList (its
_pool variable), so I don't quite understand how this error can occur.
Anyway, does this look like a bug in CursorableLinkedList?  Has anyone seen
this before and know of a fix/workaround?

Thanks,

Lee

Reply via email to