Author: jleroux
Date: Sun Jan 25 07:54:45 2009
New Revision: 737486
URL:
http://svn.apache.org/viewvc?rev=737486&view=revLog:
Fix an issue reported by Bilgin, I said it was the 1st thing I thought when I got up this morning, but now I remember it was rather one of the last things I thought when falling asleep last nigh. Sorry for being so talkative this morning :D
Modified:
ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=737486&r1=737485&r2=737486&view=diff==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sun Jan 25 07:54:45 2009
@@ -106,7 +106,7 @@
private Map itemGroupByNumberMap = FastMap.newInstance();
protected long nextGroupNumber = 1;
private List paymentInfo = FastList.newInstance();
- private List<CartShipInfo> shipInfo = FastList.<CartShipInfo> newInstance();
+ private List shipInfo = FastList.newInstance();
private Map contactMechIdsMap = new HashMap();
private Map orderAttributes = new HashMap();
private Map attributes = new HashMap(); // user defined attributes
@@ -2019,16 +2019,18 @@
}
protected void cleanUpShipGroups() {
- for (CartShipInfo csi : this.shipInfo) {
- Iterator si = csi.shipItemInfo.keySet().iterator();
+ Iterator csi = this.shipInfo.iterator();
+ while (csi.hasNext()) {
+ CartShipInfo cartShipInfo = (CartShipInfo) csi.next();
+ Iterator si = cartShipInfo.shipItemInfo.keySet().iterator();
while (si.hasNext()) {
ShoppingCartItem item = (ShoppingCartItem) si.next();
if (item.getQuantity() == 0.0) {
si.remove();
}
}
- if (csi.shipItemInfo.size() == 0) {
- this.shipInfo.remove(csi);
+ if (cartShipInfo.shipItemInfo.size() == 0) {
+ this.shipInfo.remove(cartShipInfo);
}
}
}