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

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

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

jleroux@apache.org
Author: jleroux
Date: Sat Jan 24 21:54:08 2009
New Revision: 737443

URL: http://svn.apache.org/viewvc?rev=737443&view=rev
Log:
A patch from Dimitri Unruh "Cleanup ship groups doesn't work"  '(https://issues.apache.org/jira/browse/OFBIZ-1953) - OFBIZ-1953



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=737443&r1=737442&r2=737443&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 Jan 24 21:54:08 2009
@@ -109,7 +109,7 @@
     private Map itemGroupByNumberMap = FastMap.newInstance();
     protected long nextGroupNumber = 1;
     private List paymentInfo = FastList.newInstance();
-    private List shipInfo = FastList.newInstance();
+    private List<CartShipInfo> shipInfo = FastList.<CartShipInfo> newInstance();
     private Map contactMechIdsMap = new HashMap();
     private Map orderAttributes = new HashMap();
     private Map attributes = new HashMap(); // user defined attributes
@@ -2097,8 +2097,7 @@
     }
 
     public void cleanUpShipGroups() {
-        for (int i = 0; i < this.shipInfo.size(); i++) {
-            CartShipInfo csi = this.getShipInfo(i);
+        for (CartShipInfo csi : this.shipInfo) {
             Iterator si = csi.shipItemInfo.keySet().iterator();
             while (si.hasNext()) {
                 ShoppingCartItem item = (ShoppingCartItem) si.next();