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 56d0aefcab..477d21a8c2 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 @@ -679,10 +679,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;