java · java/ConcurrentModificationException
ConcurrentModificationException
ConcurrentModificationException
Thrown by iterators when the underlying collection is modified while an iteration is in progress, detected by a fail-fast mechanism. Use CopyOnWriteArrayList or iterate a snapshot instead.
Also defined in
- kotlin ConcurrentModificationException Thrown by a collection iterator when the underlying collection is modified while iterating over it, which would produce undefined iteration behavior.
- scala ConcurrentModificationException Thrown when a Java iterator detects that the underlying collection was modified during iteration. Most Scala collections are immutable and not susceptible; this typically occurs when using mutable Java collections from Scala.