?java.util.ConcurrentModificationException-->并發(fā)修改異常,在遍歷集合過程中修改集合內(nèi)容會(huì)拋出此異常。
解決方法:
for (Object entity : objectList){
//throw ConcurrentModificationException
objectList.remove(entity);
}
--->
for (Iterator<Object> it= objectList.iterator(); it.hasNext();){
it.next();
it.remove();
}