Page 1 of 1

issue cloaning orderItemAttributes during applying promocode

Posted: Fri Jul 13, 2012 6:17 pm
by sai
I am using Broadleaf 1.6.1 GA

I am getting a null pointer when applying promo code on BundleOrderItem, during cloaning process This is due to not having OrderItemAttributesMap initialized. Calling a put method in the clone() on OrderItemAttributesMap results in null pointer.

Below is the code snippet

Code: Select all

public class OrderItemImpl implements OrderItem, Cloneable {

-----

Code: Select all

protected Map<String,OrderItemAttribute> orderItemAttributeMap;

-----

Code: Select all

public OrderItem clone() {

------
if (getOrderItemAttributes() != null) {
for (OrderItemAttribute attribute : getOrderItemAttributes().values()) {
OrderItemAttribute clone = attribute.clone();
clone.setOrderItem(orderItem);
orderItem.getOrderItemAttributes().put(clone.getName(), clone);
}
}
Thanks

Re: issue cloaning orderItemAttributes during applying promocode

Posted: Tue Jul 17, 2012 10:10 am
by ktisdell
This is been documented in the following Jira ticket:

http://jira.broadleafcommerce.org/browse/BLC-605

It has been fixed and should be in the current snapshot.