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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

doogie-3
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") + "]");
+            }
         }
     }