Top "Concurrentmodification" questions

Concurrent modification is a common problem with some thread-using applications, when not properly using locks/syncronization.

Avoiding TreeMap ConcurrentModificationException?

I am calling function that returns TreeMap instance, and in the calling code I wanted to modify the TreeMap. However, …

java treemap concurrentmodification
java.util.ConcurrentModificationException on ArrayList

I have a Server class and a Timer inside it which is supposed to clear dead clients (clients who crashed). …

java client arraylist concurrentmodification
Collection - Iterator.remove() vs Collection.remove()

As per Sun , "Iterator.remove is the only safe way to modify a collection during iteration; the behavior is unspecified …

java collections iterator concurrentmodification
Why is there a ConcurrentModificationException even when list is synchronized?

I have Android multi-threading application. There is some probability that two or more triggers might run the same part of …

java concurrentmodification
Behavior of entrySet().removeIf in ConcurrentHashMap

I would like to use ConcurrentHashMap to let one thread delete some items from the map periodically and other threads …

java multithreading java.util.concurrent concurrenthashmap concurrentmodification
Reason for ConcurrentModificationException on ArrayLists iterator.next()

I have no idea why a ConcurrentModificationException occurs when i iterate over an ArrayList. The ArrayList is methode scoped, so …

java arraylist concurrentmodification
ConcurrentModificationException when using iterator and iterator.remove()

private int checkLevel(String bigWord, Collection<String> dict, MinMax minMax) { /*value initialised to losing*/ int value = 0; if (minMax == …

java collections iterator concurrentmodification
Guava MultiMap and ConcurrentModificationException

I don't understand why I get a ConcurrentModificationException when I iterate through this multimap. I read the following entry, but …

java concurrency guava multimap concurrentmodification