Getting this error ?
java.util.ConcurrentModificationExceptionThis exception might be happened because of:
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
at java.util.AbstractList$Itr.next(AbstractList.java:420)
1. Doing an iteration over a collection that is being modified during the loop. For example:
for (Object object: list) {2. Modifying the list at the same time (because List isn't thread safe). It can only happen either when the list object was declared static or singleton, or it's owned by a static or singleton object.
list.remove(object);
}
0 comments: (+add yours?)
Post a Comment