Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1305309&r1=1305308&r2=1305309&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 Mon Mar 26 11:08:11 2012
@@ -20,7 +20,6 @@ package org.ofbiz.order.shoppinglist;
 
 import java.math.BigDecimal;
 import java.sql.Timestamp;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Date;
@@ -326,11 +325,8 @@ public class ShoppingListServices {
             }
 
             List<GenericValue> orderItems = orh.getOrderItems();
-            Iterator<GenericValue> i = orderItems.iterator();
-            String productId = null;
-            while (i.hasNext()) {
-                GenericValue orderItem = i.next();
-                productId = orderItem.getString("productId");
+            for(GenericValue orderItem : orderItems) {
+                String productId = orderItem.getString("productId");
                 if (UtilValidate.isNotEmpty(productId)) {
                     Map<String, Object> ctx = UtilMisc.<String, 
Object>toMap("userLogin", userLogin, "shoppingListId", shoppingListId, 
"productId",
                             orderItem.get("productId"), "quantity", 
orderItem.get("quantity"));
@@ -471,10 +467,8 @@ public class ShoppingListServices {
                 }
 
 
-                Iterator<GenericValue> i = items.iterator();
                 ProductConfigWrapper configWrapper = null;
-                while (i.hasNext()) {
-                    GenericValue shoppingListItem = i.next();
+                for(GenericValue shoppingListItem : items) {
                     String productId = shoppingListItem.getString("productId");
                     BigDecimal quantity = 
shoppingListItem.getBigDecimal("quantity");
                     Timestamp reservStart = 
shoppingListItem.getTimestamp("reservStart");
@@ -565,9 +559,7 @@ public class ShoppingListServices {
         String orderId = (String) context.get("orderId");
         try {
             List<GenericValue> orderItems = delegator.findByAnd("OrderItem", 
UtilMisc.toMap("orderId", orderId));
-            Iterator<GenericValue> iter = orderItems.iterator();
-            while (iter.hasNext()) {
-                GenericValue orderItem = iter.next();
+            for(GenericValue orderItem : orderItems) {
                 String shoppingListId = orderItem.getString("shoppingListId");
                 String shoppingListItemSeqId = 
orderItem.getString("shoppingListItemSeqId");
                 if (UtilValidate.isNotEmpty(shoppingListId)) {

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java?rev=1305309&r1=1305308&r2=1305309&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java 
(original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/test/OrderTestServices.java 
Mon Mar 26 11:08:11 2012
@@ -19,7 +19,6 @@
 package org.ofbiz.order.test;
 
 import java.math.BigDecimal;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -96,9 +95,7 @@ public class OrderTestServices {
                 if (result.get("categoryMembers") != null) {
                     List<GenericValue> productCategoryMembers = 
UtilGenerics.checkList(result.get("categoryMembers"));
                     if (productCategoryMembers != null) {
-                        Iterator<GenericValue> i = 
productCategoryMembers.iterator();
-                        while (i.hasNext()) {
-                            GenericValue prodCatMemb = i.next();
+                        for(GenericValue prodCatMemb : productCategoryMembers) 
{
                             if (prodCatMemb != null) {
                                 
productsList.add(prodCatMemb.getString("productId"));
                             }

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=1305309&r1=1305308&r2=1305309&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
 Mon Mar 26 11:08:11 2012
@@ -362,13 +362,11 @@ public class ZipSalesServices {
         }
 
         if (ruleLookup != null) {
-            Iterator<GenericValue> ruleIterator = ruleLookup.iterator();
-            while (ruleIterator.hasNext()) {
+            for(GenericValue rule : ruleLookup) {
                 if (!taxShipping) {
                     // if we found an rule which passes no need to contine 
(all rules are ||)
                     break;
                 }
-                GenericValue rule = ruleIterator.next();
                 String idCode = rule.getString("idCode");
                 String taxable = rule.getString("taxable");
                 String condition = rule.getString("shipCond");


Reply via email to