xxxxxxxxxx
Iterator<String> iter = myArrayList.iterator();
while (iter.hasNext()) {
String str = iter.next();
if (someCondition)
iter.remove();
}
xxxxxxxxxx
It means you are changing a list whilst you are also iterating it, and
Java doesn't like that.
Possible solution:
Save the changes you would like to make in a list and execute after
each iteration.