You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2010/10/02 18:36:20 UTC

svn commit: r1003829 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Author: apatel
Date: Sat Oct  2 16:35:54 2010
New Revision: 1003829

URL: http://svn.apache.org/viewvc?rev=1003829&view=rev
Log:
Bug fix, use delegator getter method instead of variable to avoid getting uninitialized object.

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?rev=1003829&r1=1003828&r2=1003829&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Oct  2 16:35:54 2010
@@ -504,7 +504,7 @@ public class ShoppingCart implements Ite
             if (sci.equals(productId, reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, features, attributes, prodCatalogId,selectedAmount, configWrapper, itemType, itemGroup, false)) {
                 BigDecimal newQuantity = sci.getQuantity().add(quantity);
                 try {
-                    BigDecimal minQuantity = getMinimumOrderQuantity(delegator,sci.getBasePrice(), productId);
+                    BigDecimal minQuantity = getMinimumOrderQuantity(getDelegator(),sci.getBasePrice(), productId);
                     if(newQuantity.compareTo(minQuantity) < 0) {
                         newQuantity = minQuantity;
                     }
@@ -549,7 +549,7 @@ public class ShoppingCart implements Ite
             }
         } else {
             try {
-                BigDecimal minQuantity = getMinimumOrderQuantity(delegator,null, productId);
+                BigDecimal minQuantity = getMinimumOrderQuantity(getDelegator(),null, productId);
                 if(quantity.compareTo(minQuantity) < 0) {
                     quantity = minQuantity;
                 }