You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/04/27 02:22:07 UTC

svn commit: r532919 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Author: jaz
Date: Thu Apr 26 17:22:06 2007
New Revision: 532919

URL: http://svn.apache.org/viewvc?view=rev&rev=532919
Log:
fixed NPE in digitial fulfillment

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=532919&r1=532918&r2=532919
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Thu Apr 26 17:22:06 2007
@@ -2827,7 +2827,12 @@
                     // try looking up the parent product if the product has no content and is a variant
                     if (((allProductContent == null) || allProductContent.size() == 0) && ("Y".equals(product.getString("isVariant")))) {
                         GenericValue parentProduct = ProductWorker.getParentProduct(product.getString("productId"), delegator);
-                        allProductContent.addAll(parentProduct.getRelated("ProductContent"));
+                        if (allProductContent == null) {
+                            allProductContent = FastList.newInstance();
+                        }
+                        if (parentProduct != null) {
+                            allProductContent.addAll(parentProduct.getRelated("ProductContent"));
+                        }
                     }
                     
                     if (allProductContent != null && allProductContent.size() > 0) {