org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.util.ConcurrentModificationException
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
.......
List<Goods>g_list = goods.getSupplier().getStore().getGoods_list(); for (Goods g :g_list ) { if(g.getGoods_status()!=0){ g_list.remove(g); } } vo.setVo_goods_num(g_list.size());
不能在遍历集合的时候修改或删除集合元素