svn commit: r780276 - /ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java

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

svn commit: r780276 - /ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java

ashish-18
Author: ashish
Date: Sat May 30 14:36:38 2009
New Revision: 780276

URL: http://svn.apache.org/viewvc?rev=780276&view=rev
Log:
Minor change to overcome from NullPointerException.

Modified:
    ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java

Modified: ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java?rev=780276&r1=780275&r2=780276&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java Sat May 30 14:36:38 2009
@@ -230,12 +230,13 @@
 
         // handle the adjustments
         OrderAdjustment adjustment = info.getOrderAdjustment();
-        addAdjustments(cart, adjustment);
-
-        // ship group info
-        Shipping shipping = info.getOrderAdjustment().getShipping();
-        addShipInfo(cart, shipping, partyInfo[1]);
-
+        if (adjustment != null){
+            addAdjustments(cart, adjustment);
+            // ship group info
+            Shipping shipping = info.getOrderAdjustment().getShipping();
+            addShipInfo(cart, shipping, partyInfo[1]);
+        }
+        
         // set the cart payment method
         cart.addPaymentAmount(PAYMENT_METHOD, cart.getGrandTotal());