You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Andrew Zeneski <an...@hotwaxmedia.com> on 2007/04/29 04:37:01 UTC
Re: svn commit: r533447 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Good catch, thanks for fixing this!
Andrew
On Apr 28, 2007, at 8:08 PM, jonesde@apache.org wrote:
> Author: jonesde
> Date: Sat Apr 28 17:08:16 2007
> New Revision: 533447
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=533447
> Log:
> 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;
>
>