Error : java.util.ConcurrentModificationException

后端 未结 3 1812
情歌与酒
情歌与酒 2020-12-22 06:34

i have a grid from where users select the row , when a row is clicked then its id is sending to my action class AddBookToSession.java and after wards it is retu

3条回答
  •  一向
    一向 (楼主)
    2020-12-22 07:20

    Fundamentally, you're modifying an object while some other object is depending on the state of the first object to remain unchanged.

    This is most often seen when using a non-modification-safe iterator on some sort of collection object, and then modifying the collection.

    My JSP is too rusty to wade through your source, but I see a couple of cases where you appear to be using iterators, and the one in your JSP looks most suspect.

    (I believe this error can also occur when you use multi-threading to manage collection objects in a non-thread-safe fashion.)

提交回复
热议问题