diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java b/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java index 15558ce4dc..987b6e04dc 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java @@ -660,10 +660,7 @@ public class ShoppingCartItem implements java.io.Serializable { 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;