svn commit: r910513 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java

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

svn commit: r910513 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java

ashish-18
Author: ashish
Date: Tue Feb 16 13:49:42 2010
New Revision: 910513

URL: http://svn.apache.org/viewvc?rev=910513&view=rev
Log:
Applied patch from jira issue - OFBIZ-3478: Compares the specified object with this cart item is not in the right way.
Thanks Amit for the contribution.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=910513&r1=910512&r2=910513&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Tue Feb 16 13:49:42 2010
@@ -2295,7 +2295,7 @@
             return false;
         }
 
-        if (this.getSelectedAmount() != selectedAmount) {
+        if (selectedAmount != null && this.selectedAmount.compareTo(selectedAmount) != 0) {
             return false;
         }
 
@@ -2306,11 +2306,11 @@
             return false;
         }
 
-        if (this.reservLength != reservLength) {
+        if (reservLength != null && this.reservLength.compareTo(reservLength) != 0) {
             return false;
         }
 
-        if (this.reservPersons != reservPersons) {
+        if (reservPersons != null && this.reservPersons.compareTo(reservPersons) != 0) {
             return false;
         }