Author: jonesde
Date: Sat Apr 28 17:08:16 2007
New Revision: 533447
URL:
http://svn.apache.org/viewvc?view=rev&rev=533447Log:
Fixed NPE in new finAccountId checking; now we can complete a checkout again
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?view=diff&rev=533447&r1=533446&r2=533447==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Apr 28 17:08:16 2007
@@ -4319,9 +4319,15 @@
public int compareTo(Object o) {
CartPaymentInfo that = (CartPaymentInfo) o;
Debug.logInfo("Compare [" + this.toString() + "] to [" + that.toString() + "]", module);
- if (!this.finAccountId.equals(that.finAccountId)) {
- return -1;
+
+ if (this.finAccountId == null) {
+ if (that.finAccountId != null) {
+ return -1;
+ }
+ } else if (!this.finAccountId.equals(that.finAccountId)) {
+ return -1;
}
+
if (this.paymentMethodId != null) {
if (that.paymentMethodId == null) {
return 1;