Skip to content

Commit

Permalink
Fixed: Duplicate a ShoppingCartItem didn't propage OrderItemAttributes
Browse files Browse the repository at this point in the history
(OFBIZ-10929)

When you clone a ShoppingCartItem by constructor :
    ShoppingCartItem sci = new ShoppingCartItem(ShoppingCartItem item)

The ShoppingCartItem.orderItemAttributes wasn't propage from origin.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857657 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Apr 16, 2019
1 parent c0965e8 commit ed290e8
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -679,10 +679,7 @@ public ShoppingCartItem(ShoppingCartItem item) {
this.associatedOrderItemSeqId = item.getAssociatedOrderItemSeqId();
this.orderItemAssocTypeId = item.getOrderItemAssocTypeId();
this.setStatusId(item.getStatusId());
if (UtilValidate.isEmpty(item.getOrderItemAttributes())) {
this.orderItemAttributes = new HashMap<>();
this.orderItemAttributes.putAll(item.getOrderItemAttributes());
}
this.orderItemAttributes = item.getOrderItemAttributes() == null ? new HashMap<>() : new HashMap<>(item.getOrderItemAttributes());
this.attributes = item.getAttributes() == null ? new HashMap<>() : new HashMap<>(item.getAttributes());
this.setOrderItemSeqId(item.getOrderItemSeqId());
this.locale = item.locale;
Expand Down

0 comments on commit ed290e8

Please sign in to comment.