I am also not using multiple threads.
The JVM begs to differ:
I get a concurrent modification error ...
Not strictly true.
Note that this exception does not always indicate that an object has been concurrently modified by a different thread. If a single thread issues a sequence of method invocations that violates the contract of an object, the object may throw this exception. For example, if a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this exception.
The provided code fragment could
be doing this, but there's no way for us to know if collisionObjectLayer.getObjects()
is the same Collection as ItemManager.itemList