[ https://issues.apache.org/jira/browse/OFBIZ-10696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713593#comment-16713593 ]
Jacques Le Roux edited comment on OFBIZ-10696 at 12/8/18 6:20 PM: ------------------------------------------------------------------ Thanks Danny, Actually it does not even work. My Predicate uses an iterator when actually {{removeIf()}} uses its own iterator so I get a {{NoSuchElementException}}. Anyway was just a quick try, I was curious if I could use an Iterator in a Predicate for {{removeIf()}}. I also tested your change, and no surprise it's OK. was (Author: jacques.le.roux): Thanks Danny, Actually it does not even works. My Predicate use an iterator when actually {{removeIf()}} use its own iterator so I get a {{NoSuchElementException}}. Anyway was just a quick try, I was curious if I could use an Iterator in a Predicate for {{removeIf()}}. I also tested your change, and no surprise it's OK. > ConcurrentModificationException in ShoppingCart.cleanUpShipGroups > ----------------------------------------------------------------- > > Key: OFBIZ-10696 > URL: https://issues.apache.org/jira/browse/OFBIZ-10696 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: Trunk > Reporter: Danny Trunk > Assignee: Jacques Le Roux > Priority: Major > Fix For: 17.12.01, 16.11.06 > > Attachments: OFBIZ-10696.diff > > > {code:java} > java.util.ConcurrentModificationException: null > at > java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) > ~[?:1.8.0_181] > at java.util.LinkedList$ListItr.next(LinkedList.java:888) > ~[?:1.8.0_181] > at > org.apache.ofbiz.order.shoppingcart.ShoppingCart.cleanUpShipGroups(ShoppingCart.java:2199) > ~[ofbiz.jar:?] > {code} > There's a for-loop over shipInfo and a call to clear inside this loop which > leads to a ConcurrentModificationException: > https://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java?view=markup#l2251 -- This message was sent by Atlassian JIRA (v7.6.3#76005)