Author: sichen Date: Wed Sep 20 18:48:36 2006 New Revision: 448428 URL: http://svn.apache.org/viewvc?view=rev&rev=448428 Log: Avoid possible NPE during order black list checking if order has no payment methods
Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?view=diff&rev=448428&r1=448427&r2=448428 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Wed Sep 20 18:48:36 2006 @@ -1112,7 +1112,7 @@ Iterator i = paymentMethods.iterator(); while (i.hasNext()) { GenericValue paymentMethod = (GenericValue) i.next(); - if (paymentMethod.getString("paymentMethodTypeId").equals("CREDIT_CARD")) { + if ((paymentMethod != null) && ("CREDIT_CARD".equals(paymentMethod.getString("paymentMethodTypeId")))) { GenericValue creditCard = null; GenericValue billingAddress = null; try {