You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/07/20 19:14:12 UTC

svn commit: r965915 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Author: doogie
Date: Tue Jul 20 17:14:11 2010
New Revision: 965915

URL: http://svn.apache.org/viewvc?rev=965915&view=rev
Log:
Fix NPE in thrown exception reporting an invalid orderHeader when
orderHeader is null in the constructor.

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=965915&r1=965914&r2=965915&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 Tue Jul 20 17:14:11 2010
@@ -110,7 +110,11 @@ public class OrderReadHelper {
             }
         }
         if (this.orderHeader == null) {
-            throw new IllegalArgumentException("Order header passed in is not valid for orderId [" + orderHeader.getString("orderId") + "]");
+            if (orderHeader == null) {
+                throw new IllegalArgumentException("Order header passed is null, or is otherwise invalid");
+            } else {
+                throw new IllegalArgumentException("Order header passed in is not valid for orderId [" + orderHeader.getString("orderId") + "]");
+            }
         }
     }