[ 
https://issues.apache.org/jira/browse/OFBIZ-5194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765046#comment-13765046
 ] 

Leon commented on OFBIZ-5194:
-----------------------------

Thanks for resolve this bug. But it introduce a small flaw: all cancelled items 
is filtered out from order item list.

The filter condition before this patch is : 
("Y".equals(orderItem.get("isPromo")) && 
"ITEM_CANCELLED".equals(orderItem.get("statusId"))); -- means filter out the 
item that is promo "*AND*" cancelled.
That of patch is : ! ((item.isPromo == null || item.isPromo == 'N')  && 
!(item.statusId.equals('ITEM_CANCELLED'))) -- means filter outer the item that 
is promo "*OR*" cancelled.

Theses two is not equivalent.  After this patch, all cancelled items are filter 
out, no matter it's promo or not.

                
> ConcurrentModificationException when cancelling an order
> --------------------------------------------------------
>
>                 Key: OFBIZ-5194
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5194
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Jonatan Soto
>            Assignee: Jacques Le Roux
>            Priority: Blocker
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk, 
> Release Branch 12.04
>
>         Attachments: patch.txt, patch.txt
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> After the order gets cancelled, there is a loop in OrderView.groovy@122 that 
> removes promotional order line items retrieved from the OrderReadHelper class 
> when cancelled. This is what makes the ConcurrentModificationException to be 
> thrown.
> For further details, check out the following thread at the dev mailing list: 
> http://ofbiz.markmail.org/message/vmm65cmbf5hkmqm6?page=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to