public void method(){
...
for(Object obj: finalObjects){
....
doSth(obj);
....
}
}
when I was traversing ArrayList in the main thread, java.util.ConcurrentModificationException
has checked doSth and did not modify the global variable finalObjects , so I suspect that some asynchronous method modified this variable during my traversal. Because the system is so large, it is impossible to directly find out where it has been modified. Is there any way to get it at run time, where the async is, or which thread modifies finalObjects to cause the exception?
ask the bosses, thank you!
