svn commit: r539730 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

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

svn commit: r539730 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

lektran
Author: lektran
Date: Sat May 19 04:18:57 2007
New Revision: 539730

URL: http://svn.apache.org/viewvc?view=rev&rev=539730
Log:
Fix NPE

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?view=diff&rev=539730&r1=539729&r2=539730
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Sat May 19 04:18:57 2007
@@ -214,6 +214,9 @@
         if (shippableWeight == null) {
             shippableWeight = new Double(0.00);
         }
+        if (initialEstimateAmt == null) {
+            initialEstimateAmt = new Double(0.00);
+        }
 
         // get the ShipmentCostEstimate(s)
         Map estFields = UtilMisc.toMap("productStoreId", productStoreId, "shipmentMethodTypeId", shipmentMethodTypeId,
@@ -227,7 +230,7 @@
             return ServiceUtil.returnError("Unable to locate estimates from database");
         }
         if (estimates == null || estimates.size() < 1) {
-            if (initialEstimateAmt == null || initialEstimateAmt.doubleValue() == 0.00) {
+            if (initialEstimateAmt.doubleValue() == 0.00) {
                 Debug.logWarning("Using the passed context : " + context, module);
                 Debug.logWarning("No shipping estimates found; the shipping amount returned is 0!", module);
             }