Author: jleroux
Date: Mon Sep 12 10:51:33 2011
New Revision: 1169683
URL:
http://svn.apache.org/viewvc?rev=1169683&view=revLog:
Prevent a possible NPE
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1169683&r1=1169682&r2=1169683&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Mon Sep 12 10:51:33 2011
@@ -2536,8 +2536,8 @@ public class OrderReadHelper {
BigDecimal promoAdjTotal = ZERO;
List<GenericValue> promoAdjustments = EntityUtil.filterByAnd(allOrderAdjustments, UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT"));
-
- if (!promoAdjustments.isEmpty()) {
+
+ if (UtilValidate.isNotEmpty(promoAdjustments)) {
Iterator<GenericValue> promoAdjIter = promoAdjustments.iterator();
while (promoAdjIter.hasNext()) {
GenericValue promoAdjustment = promoAdjIter.next();