You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/08/08 14:28:03 UTC

svn commit: r1511742 [4/5] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/tax/ applications/accounting/src/org/ofbi...

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=1511742&r1=1511741&r2=1511742&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 Thu Aug  8 12:28:01 2013
@@ -240,7 +240,7 @@ public class ShoppingCart implements Ite
         }
 
         // clone the groups
-        for(ShoppingCartItemGroup itemGroup : cart.itemGroupByNumberMap.values()) {
+        for (ShoppingCartItemGroup itemGroup : cart.itemGroupByNumberMap.values()) {
             // get the new parent group by number from the existing set; as before the parent must come before all children to work...
             ShoppingCartItemGroup parentGroup = null;
             if (itemGroup.getParentGroup() != null) parentGroup = this.getItemGroupByNumber(itemGroup.getParentGroup().getGroupNumber());
@@ -249,7 +249,7 @@ public class ShoppingCart implements Ite
         }
 
         // clone the items
-        for(ShoppingCartItem item : cart.items()) {
+        for (ShoppingCartItem item : cart.items()) {
             cartLines.add(new ShoppingCartItem(item));
         }
 
@@ -447,7 +447,7 @@ public class ShoppingCart implements Ite
         String previousCurrency = this.currencyUom;
         this.currencyUom = currencyUom;
         if (!previousCurrency.equals(this.currencyUom)) {
-            for(ShoppingCartItem item : this) {
+            for (ShoppingCartItem item : this) {
                 item.updatePrice(dispatcher, this);
             }
         }
@@ -774,14 +774,14 @@ public class ShoppingCart implements Ite
         localList.addAll(multipleItems);
         // the ones to keep...
         for (int i=0; i<maxItems; i++) localList.remove(0);
-        for(ShoppingCartItem item : localList) {
+        for (ShoppingCartItem item : localList) {
             this.removeCartItem(item, dispatcher);
         }
     }
 
     public static BigDecimal getItemsTotalQuantity(List<ShoppingCartItem> cartItems) {
         BigDecimal totalQuantity = BigDecimal.ZERO;
-        for(ShoppingCartItem item : cartItems) {
+        for (ShoppingCartItem item : cartItems) {
             totalQuantity = totalQuantity.add(item.getQuantity());
         }
         return totalQuantity;
@@ -789,7 +789,7 @@ public class ShoppingCart implements Ite
 
     public static List<GenericValue> getItemsProducts(List<ShoppingCartItem> cartItems) {
         List<GenericValue> productList = FastList.newInstance();
-        for(ShoppingCartItem item : cartItems) {
+        for (ShoppingCartItem item : cartItems) {
             GenericValue product = item.getProduct();
             if (product != null) {
                 productList.add(product);
@@ -799,7 +799,7 @@ public class ShoppingCart implements Ite
     }
 
     public void ensureItemsQuantity(List<ShoppingCartItem> cartItems, LocalDispatcher dispatcher, BigDecimal quantity) throws CartItemModifyException {
-        for(ShoppingCartItem item : cartItems) {
+        for (ShoppingCartItem item : cartItems) {
             if (item.getQuantity() != quantity) {
                 item.setQuantity(quantity, dispatcher, this);
             }
@@ -810,7 +810,7 @@ public class ShoppingCart implements Ite
         BigDecimal quantityRemoved = BigDecimal.ZERO;
         // go through the items and reduce quantityToKeep by the item quantities until it is 0, then remove the remaining...
         BigDecimal quantityToKeep = quantity;
-        for(ShoppingCartItem item : cartItems) {
+        for (ShoppingCartItem item : cartItems) {
             if (quantityToKeep.compareTo(item.getQuantity()) >= 0) {
                 // quantityToKeep sufficient to keep it all... just reduce quantityToKeep and move on
                 quantityToKeep = quantityToKeep.subtract(item.getQuantity());
@@ -834,7 +834,7 @@ public class ShoppingCart implements Ite
     // ============== WorkEffort related methods ===============
     public boolean containAnyWorkEffortCartItems() {
         // Check for existing cart item.
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             if (cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) {  // create workeffort items?
                 return true;
             }
@@ -844,7 +844,7 @@ public class ShoppingCart implements Ite
 
     public boolean containAllWorkEffortCartItems() {
         // Check for existing cart item.
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             if (!cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // not a item to create workefforts?
                 return false;
             }
@@ -857,7 +857,7 @@ public class ShoppingCart implements Ite
      * This is determined by making sure no Product has a type where ProductType.isPhysical!=N.
      */
     public boolean containOnlyDigitalGoods() {
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             GenericValue product = cartItem.getProduct();
             try {
                 GenericValue productType = product.getRelatedOne("ProductType", true);
@@ -1026,12 +1026,12 @@ public class ShoppingCart implements Ite
         if (itemGroup != null) {
             // go through all cart items and remove from group if they are in it
             List<ShoppingCartItem> cartItemList = this.getCartItemsInGroup(groupNumber);
-            for(ShoppingCartItem cartItem : cartItemList) {
+            for (ShoppingCartItem cartItem : cartItemList) {
                 cartItem.setItemGroup(null);
             }
 
             // if this is a parent of any set them to this group's parent (or null)
-            for(ShoppingCartItemGroup otherItemGroup : this.itemGroupByNumberMap.values()) {
+            for (ShoppingCartItemGroup otherItemGroup : this.itemGroupByNumberMap.values()) {
                 if (itemGroup.equals(otherItemGroup.getParentGroup())) {
                     otherItemGroup.inheritParentsParent();
                 }
@@ -1087,7 +1087,7 @@ public class ShoppingCart implements Ite
         String partyId = this.getPartyId();
         if (UtilValidate.isNotEmpty(partyId)) {
             // recalculate all prices
-            for(ShoppingCartItem cartItem : this) {
+            for (ShoppingCartItem cartItem : this) {
                 cartItem.updatePrice(dispatcher, this);
             }
 
@@ -1572,7 +1572,7 @@ public class ShoppingCart implements Ite
     /** Returns the CartPaymentInfo objects which have matching fields */
     public List<CartPaymentInfo> getPaymentInfos(boolean isPaymentMethod, boolean isPaymentMethodType, boolean hasRefNum) {
         List<CartPaymentInfo> foundRecords = new LinkedList<CartPaymentInfo>();
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (isPaymentMethod && inf.paymentMethodId != null) {
                 if (hasRefNum && inf.refNum != null) {
                     foundRecords.add(inf);
@@ -1598,7 +1598,7 @@ public class ShoppingCart implements Ite
     /** Locates an existing (or creates a new) CartPaymentInfo object */
     public CartPaymentInfo getPaymentInfo(String id, String refNum, String authCode, BigDecimal amount, boolean update) {
         CartPaymentInfo thisInf = this.makePaymentInfo(id, refNum, authCode, amount);
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.compareTo(thisInf) == 0) {
                 // update the info
                 if (update) {
@@ -1634,7 +1634,7 @@ public class ShoppingCart implements Ite
                 // this payment method will set the billing address for the order;
                 // before it is set we have to verify if the billing address is
                 // compatible with the ProductGeos
-                for(GenericValue product : ShoppingCart.getItemsProducts(this.cartLines)) {
+                for (GenericValue product : ShoppingCart.getItemsProducts(this.cartLines)) {
                     if (!ProductWorker.isBillableToAddress(product, billingAddress)) {
                         throw new IllegalArgumentException("The billing address is not compatible with ProductGeos rules.");
                     }
@@ -1677,7 +1677,7 @@ public class ShoppingCart implements Ite
     }
 
     public String getPaymentRef(String id) {
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.paymentMethodId.equals(id) || inf.paymentMethodTypeId.equals(id)) {
                 return inf.refNum[0];
             }
@@ -1688,7 +1688,7 @@ public class ShoppingCart implements Ite
     /** returns the total payment amounts */
     public BigDecimal getPaymentTotal() {
         BigDecimal total = BigDecimal.ZERO;
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.amount != null) {
                 total = total.add(inf.amount);
             }
@@ -1741,7 +1741,7 @@ public class ShoppingCart implements Ite
                 List<GenericValue> declinedPaymentMethods = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId, "statusId", "PAYMENT_DECLINED"), null, false);
                 if (!UtilValidate.isEmpty(declinedPaymentMethods)) {
                     List<String> paymentMethodIdsToRemove = new ArrayList<String>();
-                    for(GenericValue opp : declinedPaymentMethods) {
+                    for (GenericValue opp : declinedPaymentMethods) {
                         paymentMethodIdsToRemove.add(opp.getString("paymentMethodId"));
                     }
                     clearPaymentMethodsById(paymentMethodIdsToRemove);
@@ -1755,7 +1755,7 @@ public class ShoppingCart implements Ite
 
     private void expireSingleUsePayments() {
         Timestamp now = UtilDateTime.nowTimestamp();
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.paymentMethodId == null || !inf.singleUse) {
                 continue;
             }
@@ -1782,7 +1782,7 @@ public class ShoppingCart implements Ite
     /** Returns the Payment Method Ids */
     public List<String> getPaymentMethodIds() {
         List<String> pmi = new LinkedList<String>();
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.paymentMethodId != null) {
                 pmi.add(inf.paymentMethodId);
             }
@@ -1793,7 +1793,7 @@ public class ShoppingCart implements Ite
     /** Returns the Payment Method Ids */
     public List<String> getPaymentMethodTypeIds() {
         List<String> pmt = FastList.newInstance();
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.paymentMethodTypeId != null) {
                 pmt.add(inf.paymentMethodTypeId);
             }
@@ -1805,7 +1805,7 @@ public class ShoppingCart implements Ite
     public List<GenericValue> getPaymentMethods() {
         List<GenericValue> methods = FastList.newInstance();
         if (UtilValidate.isNotEmpty(paymentInfo)) {
-            for(String paymentMethodId : getPaymentMethodIds()) {
+            for (String paymentMethodId : getPaymentMethodIds()) {
                 try {
                     GenericValue paymentMethod = this.getDelegator().findOne("PaymentMethod", UtilMisc.toMap("paymentMethodId", paymentMethodId), true);
                     if (paymentMethod != null) {
@@ -1826,7 +1826,7 @@ public class ShoppingCart implements Ite
     public List<GenericValue> getPaymentMethodTypes() {
         List<GenericValue> types = new LinkedList<GenericValue>();
         if (UtilValidate.isNotEmpty(paymentInfo)) {
-            for(String id : getPaymentMethodIds()) {
+            for (String id : getPaymentMethodIds()) {
                 try {
                     types.add(this.getDelegator().findOne("PaymentMethodType", UtilMisc.toMap("paymentMethodTypeId", id), true));
                 } catch (GenericEntityException e) {
@@ -1842,7 +1842,7 @@ public class ShoppingCart implements Ite
         List<GenericValue> paymentMethods = this.getPaymentMethods();
         List<GenericValue> creditCards = new LinkedList<GenericValue>();
         if (paymentMethods != null) {
-            for(GenericValue pm : paymentMethods) {
+            for (GenericValue pm : paymentMethods) {
                 if ("CREDIT_CARD".equals(pm.getString("paymentMethodTypeId"))) {
                     try {
                         GenericValue cc = pm.getRelatedOne("CreditCard", false);
@@ -1861,7 +1861,7 @@ public class ShoppingCart implements Ite
         List<GenericValue> paymentMethods = this.getPaymentMethods();
         List<GenericValue> giftCards = new LinkedList<GenericValue>();
         if (paymentMethods != null) {
-            for(GenericValue pm : paymentMethods) {
+            for (GenericValue pm : paymentMethods) {
                 if ("GIFT_CARD".equals(pm.getString("paymentMethodTypeId"))) {
                     try {
                         GenericValue gc = pm.getRelatedOne("GiftCard", false);
@@ -1893,7 +1893,7 @@ public class ShoppingCart implements Ite
 
     public GenericValue getBillingAddress() {
         GenericValue billingAddress = null;
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             billingAddress = inf.getBillingAddress(this.getDelegator());
             if (billingAddress != null) {
                 break;
@@ -2046,7 +2046,7 @@ public class ShoppingCart implements Ite
     public Map<ShoppingCartItem, BigDecimal> getShipGroupItems(int idx) {
         CartShipInfo csi = this.getShipInfo(idx);
         Map<ShoppingCartItem, BigDecimal> qtyMap = FastMap.newInstance();
-        for(ShoppingCartItem item : csi.shipItemInfo.keySet()) {
+        for (ShoppingCartItem item : csi.shipItemInfo.keySet()) {
             CartShipInfo.CartShipItemInfo csii = csi.shipItemInfo.get(item);
             qtyMap.put(item, csii.quantity);
         }
@@ -2078,7 +2078,7 @@ public class ShoppingCart implements Ite
         Map<Integer, BigDecimal> shipGroups = this.getShipGroups(item);
 
         if ((shipGroups != null) && (shipGroups.keySet() != null)) {
-            for(Integer shipGroup : shipGroups.keySet()) {
+            for (Integer shipGroup : shipGroups.keySet()) {
                 CartShipInfo cartShipInfo = this.getShipInfo(shipGroup.intValue());
 
                 cartShipInfo.resetShipAfterDateIfBefore(item.getShipAfterDate());
@@ -2226,7 +2226,7 @@ public class ShoppingCart implements Ite
             if (shippingAddress != null) {
                 Set<ShoppingCartItem> shipItems = csi.getShipItems();
                 if (UtilValidate.isNotEmpty(shipItems)) {
-                    for(ShoppingCartItem cartItem : shipItems) {
+                    for (ShoppingCartItem cartItem : shipItems) {
                         GenericValue product = cartItem.getProduct();
                         if (UtilValidate.isNotEmpty(product)) {
                             if (!ProductWorker.isShippableToAddress(product, shippingAddress)) {
@@ -2247,7 +2247,7 @@ public class ShoppingCart implements Ite
      * @param shippingContactMechId
      */
     public void setAllShippingContactMechId(String shippingContactMechId) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setShippingContactMechId(x, shippingContactMechId);
         }
     }
@@ -2275,7 +2275,7 @@ public class ShoppingCart implements Ite
      * @param shipmentMethodTypeId
      */
     public void setAllShipmentMethodTypeId(String shipmentMethodTypeId) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setShipmentMethodTypeId(x, shipmentMethodTypeId);
         }
     }
@@ -2331,7 +2331,7 @@ public class ShoppingCart implements Ite
      * @param shippingInstructions
      */
     public void setAllShippingInstructions(String shippingInstructions) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setShippingInstructions(x, shippingInstructions);
         }
     }
@@ -2360,7 +2360,7 @@ public class ShoppingCart implements Ite
      * @param maySplit
      */
     public void setAllMaySplit(Boolean maySplit) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setMaySplit(x, maySplit);
         }
     }
@@ -2388,7 +2388,7 @@ public class ShoppingCart implements Ite
      * @param giftMessage
      */
     public void setAllGiftMessage(String giftMessage) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setGiftMessage(x, giftMessage);
         }
     }
@@ -2416,7 +2416,7 @@ public class ShoppingCart implements Ite
      * @param isGift
      */
     public void setAllIsGift(Boolean isGift) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setIsGift(x, isGift);
         }
     }
@@ -2442,7 +2442,7 @@ public class ShoppingCart implements Ite
      * @param carrierPartyId
      */
     public void setAllCarrierPartyId(String carrierPartyId) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setCarrierPartyId(x, carrierPartyId);
         }
     }
@@ -2477,7 +2477,7 @@ public class ShoppingCart implements Ite
      * @param productStoreShipMethId
      */
     public void setAllProductStoreShipMethId(String productStoreShipMethId) {
-        for(int x=0; x < shipInfo.size(); x++) {
+        for (int x=0; x < shipInfo.size(); x++) {
             this.setProductStoreShipMethId(x, productStoreShipMethId);
         }
     }
@@ -2638,7 +2638,7 @@ public class ShoppingCart implements Ite
     public BigDecimal getTotalShipping() {
         BigDecimal tempShipping = BigDecimal.ZERO;
 
-        for(CartShipInfo csi : this.shipInfo) {
+        for (CartShipInfo csi : this.shipInfo) {
             tempShipping = tempShipping.add(csi.shipEstimate);
         }
 
@@ -2648,7 +2648,7 @@ public class ShoppingCart implements Ite
     /** Returns the item-total in the cart (not including discount/tax/shipping). */
     public BigDecimal getItemTotal() {
         BigDecimal itemTotal = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             itemTotal = itemTotal.add(cartItem.getBasePrice());
         }
         return itemTotal;
@@ -2657,7 +2657,7 @@ public class ShoppingCart implements Ite
     /** Returns the sub-total in the cart (item-total - discount). */
     public BigDecimal getSubTotal() {
         BigDecimal itemsTotal = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             itemsTotal = itemsTotal.add(cartItem.getItemSubTotal());
         }
         return itemsTotal;
@@ -2675,7 +2675,7 @@ public class ShoppingCart implements Ite
 
     public BigDecimal getDisplaySubTotal() {
         BigDecimal itemsTotal = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             itemsTotal = itemsTotal.add(cartItem.getDisplayItemSubTotal());
         }
         return itemsTotal;
@@ -2688,7 +2688,7 @@ public class ShoppingCart implements Ite
 
     public BigDecimal getDisplayRecurringSubTotal() {
         BigDecimal itemsTotal = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             itemsTotal = itemsTotal.add(cartItem.getDisplayItemRecurringSubTotal());
         }
         return itemsTotal;
@@ -2706,7 +2706,7 @@ public class ShoppingCart implements Ite
     /** Returns the sub-total in the cart (item-total - discount). */
     public BigDecimal getSubTotalForPromotions() {
         BigDecimal itemsTotal = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : this.cartLines) {
+        for (ShoppingCartItem cartItem : this.cartLines) {
             GenericValue product = cartItem.getProduct();
             if (product != null && "N".equals(product.getString("includeInPromotions"))) {
                 // don't include in total if this is the case...
@@ -2724,7 +2724,7 @@ public class ShoppingCart implements Ite
     public BigDecimal getOrderPaymentPreferenceTotalByType(String paymentMethodTypeId) {
         BigDecimal total = BigDecimal.ZERO;
         String thisPaymentMethodTypeId = null;
-        for(CartPaymentInfo payment : paymentInfo) {
+        for (CartPaymentInfo payment : paymentInfo) {
             if (payment.amount == null) continue;
             if (payment.paymentMethodId != null) {
                 try {
@@ -2870,7 +2870,7 @@ public class ShoppingCart implements Ite
         if (termTypeId == null) {
             return false;
         }
-        for(GenericValue orderTerm : orderTerms) {
+        for (GenericValue orderTerm : orderTerms) {
             if (termTypeId.equals(orderTerm.getString("termTypeId"))) {
                 return true;
             }
@@ -2895,7 +2895,7 @@ public class ShoppingCart implements Ite
 
         adjsLists.add(this.getAdjustments());
 
-        for(ShoppingCartItem item : this) {
+        for (ShoppingCartItem item : this) {
             if (item.getAdjustments() != null) {
                 adjsLists.add(item.getAdjustments());
             }
@@ -2921,7 +2921,7 @@ public class ShoppingCart implements Ite
     public BigDecimal getTotalWeight() {
         BigDecimal weight = BigDecimal.ZERO;
 
-        for(ShoppingCartItem item : this.cartLines) {
+        for (ShoppingCartItem item : this.cartLines) {
             weight = weight.add(item.getWeight().multiply(item.getQuantity()));
         }
         return weight;
@@ -2931,7 +2931,7 @@ public class ShoppingCart implements Ite
     public BigDecimal getTotalQuantity() {
         BigDecimal count = BigDecimal.ZERO;
 
-        for(ShoppingCartItem item : this.cartLines) {
+        for (ShoppingCartItem item : this.cartLines) {
             count = count.add(item.getQuantity());
         }
         return count;
@@ -3027,7 +3027,7 @@ public class ShoppingCart implements Ite
     /** Returns true when there are shippable items in the cart */
     public boolean shippingApplies() {
         boolean shippingApplies = false;
-        for(ShoppingCartItem item : this) {
+        for (ShoppingCartItem item : this) {
             if (item.shippingApplies()) {
                 shippingApplies = true;
                 break;
@@ -3039,7 +3039,7 @@ public class ShoppingCart implements Ite
     /** Returns true when there are taxable items in the cart */
     public boolean taxApplies() {
         boolean taxApplies = false;
-        for(ShoppingCartItem item : this) {
+        for (ShoppingCartItem item : this) {
             if (item.taxApplies()) {
                 taxApplies = true;
                 break;
@@ -3172,7 +3172,7 @@ public class ShoppingCart implements Ite
 
     public void clearCartItemUseInPromoInfo() {
         // clear out info about which cart items have been used in promos
-        for(ShoppingCartItem cartLine : this) {
+        for (ShoppingCartItem cartLine : this) {
             cartLine.clearPromoRuleUseInfo();
         }
     }
@@ -3185,7 +3185,7 @@ public class ShoppingCart implements Ite
         BigDecimal totalDiscount = BigDecimal.ZERO;
         List<GenericValue> cartAdjustments = this.getAdjustments();
         if (cartAdjustments != null) {
-            for(GenericValue checkOrderAdjustment : cartAdjustments) {
+            for (GenericValue checkOrderAdjustment : cartAdjustments) {
                 if (UtilValidate.isNotEmpty(checkOrderAdjustment.getString("productPromoId")) &&
                         UtilValidate.isNotEmpty(checkOrderAdjustment.getString("productPromoRuleId")) &&
                         UtilValidate.isNotEmpty(checkOrderAdjustment.getString("productPromoActionSeqId"))) {
@@ -3197,7 +3197,7 @@ public class ShoppingCart implements Ite
         }
 
         // add cart line adjustments from promo actions
-        for(ShoppingCartItem checkItem : this) {
+        for (ShoppingCartItem checkItem : this) {
             Iterator<GenericValue> checkOrderAdjustments = UtilMisc.toIterator(checkItem.getAdjustments());
             while (checkOrderAdjustments != null && checkOrderAdjustments.hasNext()) {
                 GenericValue checkOrderAdjustment = checkOrderAdjustments.next();
@@ -3301,13 +3301,13 @@ public class ShoppingCart implements Ite
         // remove all cart adjustments
         this.adjustments.clear();
         // remove all cart item adjustments
-        for(ShoppingCartItem checkItem : this) {
+        for (ShoppingCartItem checkItem : this) {
             checkItem.getAdjustments().clear();
         }
     }
 
     public void clearAllItemStatus() {
-        for(ShoppingCartItem item : this) {
+        for (ShoppingCartItem item : this) {
             item.setStatusId(null);
         }
     }
@@ -3341,13 +3341,13 @@ public class ShoppingCart implements Ite
     }
 
     public synchronized void resetPromoRuleUse(String productPromoId, String productPromoRuleId) {
-        for(ShoppingCartItem cartItem : this) {
+        for (ShoppingCartItem cartItem : this) {
             cartItem.resetPromoRuleUse(productPromoId, productPromoRuleId);
         }
     }
 
     public synchronized void confirmPromoRuleUse(String productPromoId, String productPromoRuleId) {
-        for(ShoppingCartItem cartItem : this) {
+        for (ShoppingCartItem cartItem : this) {
             cartItem.confirmPromoRuleUse(productPromoId, productPromoRuleId);
         }
     }
@@ -3361,7 +3361,7 @@ public class ShoppingCart implements Ite
         // search if there is an existing entry
         List<String> parties = additionalPartyRole.get(roleTypeId);
         if (parties != null) {
-            for(String pi : parties) {
+            for (String pi : parties) {
                 if (pi.equals(partyId)) {
                     return;
                 }
@@ -3498,7 +3498,7 @@ public class ShoppingCart implements Ite
 
     public List<GenericValue> makeOrderItemGroups() {
         List<GenericValue> result = FastList.newInstance();
-        for(ShoppingCart.ShoppingCartItemGroup itemGroup : this.itemGroupByNumberMap.values()) {
+        for (ShoppingCart.ShoppingCartItemGroup itemGroup : this.itemGroupByNumberMap.values()) {
             result.add(itemGroup.makeOrderItemGroup(this.getDelegator()));
         }
         return result;
@@ -3508,7 +3508,7 @@ public class ShoppingCart implements Ite
         if (dispatcher == null) return;
         synchronized (cartLines) {
             List<ShoppingCartItem> cartLineItems = new LinkedList<ShoppingCartItem>(cartLines);
-            for(ShoppingCartItem item : cartLineItems) {
+            for (ShoppingCartItem item : cartLineItems) {
                 //Debug.logInfo("Item qty: " + item.getQuantity(), module);
                 try {
                     item.explodeItem(this, dispatcher);
@@ -3529,7 +3529,7 @@ public class ShoppingCart implements Ite
     public void explodeItems(List<ShoppingCartItem> shoppingCartItems, LocalDispatcher dispatcher) {
         if (dispatcher == null) return;
         synchronized (cartLines) {
-            for(ShoppingCartItem item : shoppingCartItems) {
+            for (ShoppingCartItem item : shoppingCartItems) {
                 //Debug.logInfo("Item qty: " + item.getQuantity(), module);
                 try {
                     item.explodeItem(this, dispatcher);
@@ -3803,7 +3803,7 @@ public class ShoppingCart implements Ite
                 remainingAmount = BigDecimal.ZERO;
             }
         }
-        for(CartPaymentInfo inf : paymentInfo) {
+        for (CartPaymentInfo inf : paymentInfo) {
             if (inf.amount == null) {
                 inf.amount = remainingAmount;
                 remainingAmount = BigDecimal.ZERO;
@@ -3822,7 +3822,7 @@ public class ShoppingCart implements Ite
             Collection<GenericValue> infos = item.getOrderItemPriceInfos();
 
             if (infos != null) {
-                for(GenericValue orderItemPriceInfo : infos) {
+                for (GenericValue orderItemPriceInfo : infos) {
                     orderItemPriceInfo.set("orderItemSeqId", item.getOrderItemSeqId());
                     allInfos.add(orderItemPriceInfo);
                 }
@@ -3853,11 +3853,11 @@ public class ShoppingCart implements Ite
     /** make a list of SurveyResponse object to update with order information set */
     public List<GenericValue> makeAllOrderItemSurveyResponses() {
         List<GenericValue> allInfos = new LinkedList<GenericValue>();
-        for(ShoppingCartItem item : this) {
+        for (ShoppingCartItem item : this) {
             List<String> responses = UtilGenerics.checkList(item.getAttribute("surveyResponses"));
             GenericValue response = null;
             if (responses != null) {
-                for(String responseId : responses) {
+                for (String responseId : responses) {
                     try {
                         response = this.getDelegator().findOne("SurveyResponse", UtilMisc.toMap("surveyResponseId", responseId), false);
                     } catch (GenericEntityException e) {
@@ -3924,7 +3924,7 @@ public class ShoppingCart implements Ite
     public List<GenericValue> makeAllShipGroupInfos() {
         List<GenericValue> groups = new LinkedList<GenericValue>();
         long seqId = 1;
-        for(CartShipInfo csi : this.shipInfo) {
+        for (CartShipInfo csi : this.shipInfo) {
             groups.addAll(csi.makeItemShipGroupAndAssoc(this.getDelegator(), this, seqId));
             seqId++;
         }
@@ -3947,7 +3947,7 @@ public class ShoppingCart implements Ite
 
             for (ShoppingCartItem item : cartLines) {
                 Map<String, String> orderItemAttributes = item.getOrderItemAttributes();
-                for(String key : orderItemAttributes.keySet()) {
+                for (String key : orderItemAttributes.keySet()) {
                     String value = orderItemAttributes.get(key);
 
                     GenericValue orderItemAttribute = getDelegator().makeValue("OrderItemAttribute");
@@ -4184,7 +4184,7 @@ public class ShoppingCart implements Ite
             Set<ShoppingCartItem> shipItems = shipInfo.getShipItems();
             if (UtilValidate.isEmpty(shipItems)) continue;
 
-            for(ShoppingCartItem cartItem : shipItems) {
+            for (ShoppingCartItem cartItem : shipItems) {
                 BigDecimal itemQuantity = cartItem.getQuantity();
                 BigDecimal dropShipQuantity = BigDecimal.ZERO;
 
@@ -4273,9 +4273,9 @@ public class ShoppingCart implements Ite
             shipInfo.supplierPartyId = supplierPartyId;
             
             Map<ShoppingCartItem, Map<Integer, BigDecimal>> supplierCartItems = UtilGenerics.checkMap(dropShipItems.get(supplierPartyId));
-            for(ShoppingCartItem cartItem : supplierCartItems.keySet()) {
+            for (ShoppingCartItem cartItem : supplierCartItems.keySet()) {
                 Map<Integer, BigDecimal> cartItemGroupQuantities = UtilGenerics.checkMap(supplierCartItems.get(cartItem));
-                for(Integer previousShipGroupIndex : cartItemGroupQuantities.keySet()) {
+                for (Integer previousShipGroupIndex : cartItemGroupQuantities.keySet()) {
                     BigDecimal dropShipQuantity = cartItemGroupQuantities.get(previousShipGroupIndex);
                     positionItemToGroup(cartItem, dropShipQuantity, previousShipGroupIndex.intValue(), newShipGroupIndex, true);
                 }
@@ -4481,7 +4481,7 @@ public class ShoppingCart implements Ite
 
         public void clearAllTaxInfo() {
             this.shipTaxAdj.clear();
-            for(CartShipItemInfo itemInfo : shipItemInfo.values()) {
+            for (CartShipItemInfo itemInfo : shipItemInfo.values()) {
                 itemInfo.itemTaxAdj.clear();
             }
         }
@@ -4566,13 +4566,13 @@ public class ShoppingCart implements Ite
             }
 
             // create the top level tax adjustments
-            for(GenericValue taxAdj : shipTaxAdj) {
+            for (GenericValue taxAdj : shipTaxAdj) {
                 taxAdj.set("shipGroupSeqId", shipGroupSeqId);
                 values.add(taxAdj);
             }
 
             // create the ship group item associations
-            for(ShoppingCartItem item : shipItemInfo.keySet()) {
+            for (ShoppingCartItem item : shipItemInfo.keySet()) {
                 CartShipItemInfo itemInfo = shipItemInfo.get(item);
 
                 GenericValue assoc = delegator.makeValue("OrderItemShipGroupAssoc");
@@ -4582,7 +4582,7 @@ public class ShoppingCart implements Ite
                 values.add(assoc);
 
                 // create the item tax adjustment
-                for(GenericValue taxAdj : itemInfo.itemTaxAdj) {
+                for (GenericValue taxAdj : itemInfo.itemTaxAdj) {
                     taxAdj.set("orderItemSeqId", item.getOrderItemSeqId());
                     taxAdj.set("shipGroupSeqId", shipGroupSeqId);
                     values.add(taxAdj);
@@ -4836,7 +4836,7 @@ public class ShoppingCart implements Ite
                     throw new GeneralRuntimeException("Split Payment Preference per Ship Group does not yet support multiple Payment Methods");
                 }
                 if ("Y".equals(splitPayPrefPerShpGrp)  && cart.paymentInfo.size() == 1) {
-                    for(CartShipInfo csi : cart.getShipGroups()) {
+                    for (CartShipInfo csi : cart.getShipGroups()) {
                         maxAmount = csi.getTotal().add(cart.getOrderOtherAdjustmentTotal().divide(new BigDecimal(cart.getShipGroupSize()), generalRounding)).add(csi.getShipEstimate().add(csi.getTotalTax(cart)));
                         maxAmount = maxAmount.setScale(scale, rounding);
 
@@ -5031,7 +5031,7 @@ public class ShoppingCart implements Ite
         if (itemBasePrice == null) {
             List<GenericValue> productPriceList = EntityUtil.filterByDate(delegator.findList("ProductPrice", EntityCondition.makeCondition("productId", itemProductId), null, null, null, false));
             Map<String, BigDecimal> productPriceMap = FastMap.newInstance();
-            for(GenericValue productPrice : productPriceList) {
+            for (GenericValue productPrice : productPriceList) {
                 productPriceMap.put(productPrice.getString("productPriceTypeId"), productPrice.getBigDecimal("price"));
             }
             if (UtilValidate.isNotEmpty(productPriceMap.get("SPECIAL_PROMO_PRICE"))) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Thu Aug  8 12:28:01 2013
@@ -127,7 +127,7 @@ public class ShoppingCartEvents {
                         }
 
                         /*Remove product  adjustment*/
-                        for(ShoppingCartItem checkItem : cart) {
+                        for (ShoppingCartItem checkItem : cart) {
                             List<GenericValue> itemAdjustments = checkItem.getAdjustments();
                             if (!itemAdjustments.isEmpty()) {
                                 index = 0;
@@ -576,7 +576,7 @@ public class ShoppingCartEvents {
                     productAssocs = delegator.findList("ProductAssoc", cond, null, null, null, false);
                     productAssocs = EntityUtil.filterByDate(productAssocs);
                     List<String> productList = FastList.newInstance();
-                    for(GenericValue productAssoc : productAssocs) {
+                    for (GenericValue productAssoc : productAssocs) {
                         if (productId.equals(productAssoc.getString("productId"))) {
                             productList.add(productAssoc.getString("productIdTo"));
                             continue;
@@ -586,7 +586,7 @@ public class ShoppingCartEvents {
                             continue;
                         }
                     }
-                    for(ShoppingCartItem sci : cart) {
+                    for (ShoppingCartItem sci : cart) {
                         if (productList.contains(sci.getProductId())) {
                             try {
                                 cart.removeCartItem(sci, dispatcher);
@@ -603,7 +603,7 @@ public class ShoppingCartEvents {
                             EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "PRODUCT_UPGRADE")), EntityOperator.AND);
                     productList = delegator.findList("ProductAssoc", cond, UtilMisc.toSet("productId"), null, null, false);
                     if (productList != null) {
-                        for(ShoppingCartItem sci : cart) {
+                        for (ShoppingCartItem sci : cart) {
                             if (productList.contains(sci.getProductId())) {
                                 try {
                                     cart.removeCartItem(sci, dispatcher);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Thu Aug  8 12:28:01 2013
@@ -209,7 +209,7 @@ public class ShoppingCartHelper {
         // Get the additional features selected for the product (if any)
         Map<String, Object> selectedFeatures = UtilHttp.makeParamMapWithPrefix(context, null, "FT", null);
         Map<String, GenericValue> additionalFeaturesMap = FastMap.newInstance();
-        for(String selectedFeatureType : selectedFeatures.keySet()) {
+        for (String selectedFeatureType : selectedFeatures.keySet()) {
             String selectedFeatureValue = (String)selectedFeatures.get(selectedFeatureType);
             if (UtilValidate.isNotEmpty(selectedFeatureValue)) {
                 GenericValue productFeatureAndAppl = null;
@@ -585,7 +585,7 @@ public class ShoppingCartHelper {
         }
 
         BigDecimal totalQuantity = BigDecimal.ZERO;
-        for(GenericValue productCategoryMember : prodCatMemberCol) {
+        for (GenericValue productCategoryMember : prodCatMemberCol) {
             BigDecimal quantity = productCategoryMember.getBigDecimal("quantity");
 
             if (quantity != null && quantity.compareTo(BigDecimal.ZERO) > 0) {
@@ -616,7 +616,7 @@ public class ShoppingCartHelper {
     public Map<String, Object> deleteFromCart(Map<String, ? extends Object> context) {
         Map<String, Object> result = null;
         ArrayList<String> errorMsgs = new ArrayList<String>();
-        for(String o : context.keySet()) {
+        for (String o : context.keySet()) {
             if (o.toUpperCase().startsWith("DELETE")) {
                 try {
                     String indexStr = o.substring(o.lastIndexOf('_') + 1);
@@ -663,7 +663,7 @@ public class ShoppingCartHelper {
         }
 
         // TODO: This should be refactored to use UtilHttp.parseMultiFormData(parameters)
-        for(String parameterName : context.keySet()) {
+        for (String parameterName : context.keySet()) {
             int underscorePos = parameterName.lastIndexOf('_');
 
             // ignore localized date input elements, just use their counterpart without the _i18n suffix
@@ -867,7 +867,7 @@ public class ShoppingCartHelper {
             }
         }
 
-        for(ShoppingCartItem item : deleteList) {
+        for (ShoppingCartItem item : deleteList) {
             int itemIndex = this.cart.getItemIndex(item);
 
             if (Debug.infoOn())

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Thu Aug  8 12:28:01 2013
@@ -1098,7 +1098,7 @@ public class ShoppingCartItem implements
                         if (supplierProduct != null) {
                             String supplierPartyId = supplierProduct.getString("partyId");
                             List shipGroups = cart.getShipGroups();
-                            for(int i = 0; i < shipGroups.size(); i++) {
+                            for (int i = 0; i < shipGroups.size(); i++) {
                                 ShoppingCart.CartShipInfo csi = (ShoppingCart.CartShipInfo)shipGroups.get(i);
                                 if (supplierPartyId.equals(csi.getSupplierPartyId())) {
                                     shipGroupIndex = i;
@@ -1118,7 +1118,7 @@ public class ShoppingCartItem implements
 
                 if (shipGroupIndex == -1) {
                     List shipGroups = cart.getShipGroups();
-                    for(int i = 0; i < shipGroups.size(); i++) {
+                    for (int i = 0; i < shipGroups.size(); i++) {
                         ShoppingCart.CartShipInfo csi = (ShoppingCart.CartShipInfo)shipGroups.get(i);
                         if (csi.getSupplierPartyId() == null) {
                             shipGroupIndex = i;
@@ -1188,7 +1188,7 @@ public class ShoppingCartItem implements
                         if (UtilValidate.isNotEmpty(productSurvey) && UtilValidate.isNotEmpty(attributes)) {
                             List<String> surveyResponses = UtilGenerics.checkList(attributes.get("surveyResponses"));
                             if (UtilValidate.isNotEmpty(surveyResponses)) {
-                                for(String surveyResponseId : surveyResponses) {
+                                for (String surveyResponseId : surveyResponses) {
                                     // TODO: implement multiple survey per product
                                     if (UtilValidate.isNotEmpty(surveyResponseId)) {
                                         priceContext.put("surveyResponseId", surveyResponseId);
@@ -1865,13 +1865,13 @@ public class ShoppingCartItem implements
                 Debug.logError(e, "Unable to get features from product : " + product.get("productId"), module);
             }
             if (featureAppls != null) {
-                for(GenericValue appl : featureAppls) {
+                for (GenericValue appl : featureAppls) {
                     featureSet.add(appl.getString("productFeatureId"));
                 }
             }
         }
         if (this.additionalProductFeatureAndAppls != null) {
-            for(GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
+            for (GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
                 featureSet.add(appl.getString("productFeatureId"));
             }
         }
@@ -2186,7 +2186,7 @@ public class ShoppingCartItem implements
                 Debug.logError(e, "Unable to get features from product : " + product.get("productId"), module);
             }
             if (featureAppls != null) {
-                for(GenericValue appl : featureAppls) {
+                for (GenericValue appl : featureAppls) {
                     BigDecimal lastQuantity = featureMap.get(appl.getString("productFeatureId"));
                     if (lastQuantity == null) {
                         lastQuantity = BigDecimal.ZERO;
@@ -2197,7 +2197,7 @@ public class ShoppingCartItem implements
             }
         }
         if (this.additionalProductFeatureAndAppls != null) {
-            for(GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
+            for (GenericValue appl : this.additionalProductFeatureAndAppls.values()) {
                 BigDecimal lastQuantity = featureMap.get(appl.getString("productFeatureId"));
                 if (lastQuantity == null) {
                     lastQuantity = BigDecimal.ZERO;
@@ -2570,7 +2570,7 @@ public class ShoppingCartItem implements
             }
 
             // add the cloned item(s) to the cart
-            for(ShoppingCartItem sci : newItems) {
+            for (ShoppingCartItem sci : newItems) {
                 cart.addItem(thisIndex, sci);
             }
         }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Thu Aug  8 12:28:01 2013
@@ -544,7 +544,7 @@ public class ShoppingCartServices {
                 // get all item adjustments EXCEPT tax adjustments
                 List<GenericValue> itemAdjustments = orh.getOrderItemAdjustments(item);
                 if (itemAdjustments != null) {
-                    for(GenericValue itemAdjustment : itemAdjustments) {
+                    for (GenericValue itemAdjustment : itemAdjustments) {
                         if (!isTaxAdjustment(itemAdjustment)) cartItem.addAdjustment(itemAdjustment);
                     }
                 }
@@ -705,7 +705,7 @@ public class ShoppingCartServices {
         // set the role information
         cart.setOrderPartyId(quote.getString("partyId"));
         if (UtilValidate.isNotEmpty(quoteRoles)) {
-            for(GenericValue quoteRole : quoteRoles) {
+            for (GenericValue quoteRole : quoteRoles) {
                 String quoteRoleTypeId = quoteRole.getString("roleTypeId");
                 String quoteRolePartyId = quoteRole.getString("partyId");
                 if ("PLACING_CUSTOMER".equals(quoteRoleTypeId)) {
@@ -727,7 +727,7 @@ public class ShoppingCartServices {
         // set the order term
         if (UtilValidate.isNotEmpty(quoteTerms)) {
             // create order term from quote term
-            for(GenericValue quoteTerm : quoteTerms) {
+            for (GenericValue quoteTerm : quoteTerms) {
                 BigDecimal termValue = BigDecimal.ZERO;
                 if (UtilValidate.isNotEmpty(quoteTerm.getString("termValue"))){
                     termValue = new BigDecimal(quoteTerm.getString("termValue"));
@@ -743,7 +743,7 @@ public class ShoppingCartServices {
 
         // set the attribute information
         if (UtilValidate.isNotEmpty(quoteAttributes)) {
-            for(GenericValue quoteAttribute : quoteAttributes) {
+            for (GenericValue quoteAttribute : quoteAttributes) {
                 cart.setOrderAttribute(quoteAttribute.getString("attrName"), quoteAttribute.getString("attrValue"));
             }
         }
@@ -788,7 +788,7 @@ public class ShoppingCartServices {
 
         long nextItemSeq = 0;
         if (UtilValidate.isNotEmpty(quoteItems)) {
-            for(GenericValue quoteItem : quoteItems) {
+            for (GenericValue quoteItem : quoteItems) {
                 // get the next item sequence id
                 String orderItemSeqId = quoteItem.getString("quoteItemSeqId");
                 orderItemSeqId = orderItemSeqId.replaceAll("\\P{Digit}", "");
@@ -904,7 +904,7 @@ public class ShoppingCartServices {
 
             // The cart item adjustments, derived from quote item adjustments, are added to the cart
             if (quoteItems != null) {
-                for(ShoppingCartItem item : cart) {
+                for (ShoppingCartItem item : cart) {
                     String orderItemSeqId = item.getOrderItemSeqId();
                     if (orderItemSeqId != null) {
                         adjs = orderAdjsMap.get(orderItemSeqId);
@@ -1012,7 +1012,7 @@ public class ShoppingCartServices {
 
         long nextItemSeq = 0;
         if (UtilValidate.isNotEmpty(shoppingListItems)) {
-            for(GenericValue shoppingListItem : shoppingListItems) {
+            for (GenericValue shoppingListItem : shoppingListItems) {
                 // get the next item sequence id
                 String orderItemSeqId = shoppingListItem.getString("shoppingListItemSeqId");
                 orderItemSeqId = orderItemSeqId.replaceAll("\\P{Digit}", "");
@@ -1107,7 +1107,7 @@ public class ShoppingCartServices {
             BigDecimal orderAdjustmentsTotal = OrderReadHelper.calcOrderAdjustments(OrderReadHelper.getOrderHeaderAdjustments(shoppingCart.getAdjustments(), null), shoppingCart.getSubTotal(), true, true, true);
             result.put("displayOrderAdjustmentsTotalCurrencyFormatted", org.ofbiz.base.util.UtilFormatOut.formatCurrency(orderAdjustmentsTotal, isoCode, locale));
             Map<String, Object> cartItemData = FastMap.newInstance();
-            for(ShoppingCartItem cartLine : shoppingCart) {
+            for (ShoppingCartItem cartLine : shoppingCart) {
                 int cartLineIndex = shoppingCart.getItemIndex(cartLine);
                 cartItemData.put("displayItemQty_" + cartLineIndex, cartLine.getQuantity());
                 cartItemData.put("displayItemPrice_" + cartLineIndex, org.ofbiz.base.util.UtilFormatOut.formatCurrency(cartLine.getDisplayPrice(), isoCode, locale));
@@ -1138,7 +1138,7 @@ public class ShoppingCartServices {
     public static Map<String, Object>resetShipGroupItems(DispatchContext dctx, Map<String, Object> context) {
         Map<String, Object> result = ServiceUtil.returnSuccess();
         ShoppingCart cart = (ShoppingCart) context.get("shoppingCart");
-        for(ShoppingCartItem item : cart) {
+        for (ShoppingCartItem item : cart) {
             cart.clearItemShipInfo(item);
             cart.setItemShipGroupQty(item, item.getQuantity(), 0);
         }
@@ -1160,7 +1160,7 @@ public class ShoppingCartServices {
             return ServiceUtil.returnError(e.toString());
         }
         Map<String, Object> vendorMap = FastMap.newInstance();
-        for(ShoppingCartItem item : cart) {
+        for (ShoppingCartItem item : cart) {
             GenericValue vendorProduct = null;
             String productId = item.getParentProductId();
             if (productId == null) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Thu Aug  8 12:28:01 2013
@@ -81,12 +81,12 @@ public class ProductDisplayWorker {
                 List<GenericValue> productsCategories = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productId", item.getProductId()), null, true);
                 productsCategories = EntityUtil.filterByDate(productsCategories, true);
                 if (productsCategories != null) {
-                    for(GenericValue productsCategoryMember : productsCategories) {
+                    for (GenericValue productsCategoryMember : productsCategories) {
                         GenericValue productsCategory = productsCategoryMember.getRelatedOne("ProductCategory", true);
                         if ("CROSS_SELL_CATEGORY".equals(productsCategory.getString("productCategoryTypeId"))) {
                             List<GenericValue> curPcms = productsCategory.getRelated("ProductCategoryMember", null, null, true);
                             if (curPcms != null) {
-                                for(GenericValue curPcm : curPcms) {
+                                for (GenericValue curPcm : curPcms) {
                                     if (!products.containsKey(curPcm.getString("productId"))) {
                                         GenericValue product = curPcm.getRelatedOne("Product", true);
                                         products.put(product.getString("productId"), product);
@@ -98,7 +98,7 @@ public class ProductDisplayWorker {
                 }
 
                 if (UtilValidate.isNotEmpty(complementProducts)) {
-                    for(GenericValue productAssoc : complementProducts) {
+                    for (GenericValue productAssoc : complementProducts) {
                         if (!products.containsKey(productAssoc.getString("productIdTo"))) {
                             GenericValue product = productAssoc.getRelatedOne("AssocProduct", true);
                             products.put(product.getString("productId"), product);
@@ -227,7 +227,7 @@ public class ProductDisplayWorker {
             // remove all products that are already in the cart
             ShoppingCart cart = (ShoppingCart) httpRequest.getSession().getAttribute("shoppingCart");
             if (UtilValidate.isNotEmpty(cart)) {
-                for(ShoppingCartItem item : cart) {
+                for (ShoppingCartItem item : cart) {
                     String productId = item.getProductId();
                     products.remove(productId);
                     productQuantities.remove(productId);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Thu Aug  8 12:28:01 2013
@@ -328,7 +328,7 @@ public class ProductPromoWorker {
             // before sorting split into two lists and sort each list; one list for promos that have a order total condition, and the other list for all promos that don't; then we'll always run the ones that have no condition on the order total first
             List<Map<Object, Object>> productPromoDiscountMapList = FastList.newInstance();
             List<Map<Object, Object>> productPromoDiscountMapListOrderTotal = FastList.newInstance();
-            for(GenericValue productPromo : productPromoList) {
+            for (GenericValue productPromo : productPromoList) {
                 Map<Object, Object> productPromoDiscountMap = UtilGenerics.checkMap(UtilMisc.toMap("productPromo", productPromo, "totalDiscountAmount", cart.getProductPromoUseTotalDiscount(productPromo.getString("productPromoId"))));
                 if (hasOrderTotalCondition(productPromo, delegator)) {
                     productPromoDiscountMapListOrderTotal.add(productPromoDiscountMap);
@@ -368,7 +368,7 @@ public class ProductPromoWorker {
     protected static boolean hasOrderTotalCondition(GenericValue productPromo, Delegator delegator) throws GenericEntityException {
         boolean hasOtCond = false;
         List<GenericValue> productPromoConds = delegator.findByAnd("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromo.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"), true);
-        for(GenericValue productPromoCond : productPromoConds) {
+        for (GenericValue productPromoCond : productPromoConds) {
             String inputParamEnumId = productPromoCond.getString("inputParamEnumId");
             if ("PPIP_ORDER_TOTAL".equals(inputParamEnumId)) {
                 hasOtCond = true;
@@ -401,7 +401,7 @@ public class ProductPromoWorker {
                     break;
                 }
 
-                for(GenericValue productPromo : productPromoList) {
+                for (GenericValue productPromo : productPromoList) {
                     String productPromoId = productPromo.getString("productPromoId");
 
                     List<GenericValue> productPromoRules = productPromo.getRelated("ProductPromoRule", null, null, true);
@@ -914,7 +914,7 @@ public class ProductPromoWorker {
                 Set<String> productIds = ProductPromoWorker.getPromoRuleCondProductIds(productPromoCond, delegator, nowTimestamp);
 
                 List<ShoppingCartItem> lineOrderedByBasePriceList = cart.getLineListOrderedByBasePrice(false);
-                for(ShoppingCartItem cartItem : lineOrderedByBasePriceList) {
+                for (ShoppingCartItem cartItem : lineOrderedByBasePriceList) {
                     // only include if it is in the productId Set for this check and if it is not a Promo (GWP) item
                     GenericValue product = cartItem.getProduct();
                     String parentProductId = cartItem.getParentProductId();
@@ -1400,7 +1400,7 @@ public class ProductPromoWorker {
                     if ("Y".equals(productPromoAction.get("useCartQuantity"))) {
                         quantity = BigDecimal.ZERO;
                         List<ShoppingCartItem> used = getCartItemsUsed(cart, productPromoAction);
-                        for(ShoppingCartItem item : used) {
+                        for (ShoppingCartItem item : used) {
                             BigDecimal available = item.getPromoQuantityAvailable();
                             quantity = quantity.add(available).add(item.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction));
                             item.addPromoQuantityCandidateUse(available, productPromoAction, false);
@@ -1424,7 +1424,7 @@ public class ProductPromoWorker {
                     }
                     if ("Y".equals(product.getString("isVirtual"))) {
                         List<GenericValue> productAssocs = EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("sequenceNum"), true));
-                        for(GenericValue productAssoc : productAssocs) {
+                        for (GenericValue productAssoc : productAssocs) {
                             optionProductIds.add(productAssoc.getString("productIdTo"));
                         }
                         productId = null;
@@ -1716,7 +1716,7 @@ public class ProductPromoWorker {
             Set<String> productIds = ProductPromoWorker.getPromoRuleActionProductIds(productPromoAction, delegator, nowTimestamp);
 
             // go through the cart items and for each product that has a specialPromoPrice use that price
-            for(ShoppingCartItem cartItem : cart.items()) {
+            for (ShoppingCartItem cartItem : cart.items()) {
                 String itemProductId = cartItem.getProductId();
                 if (UtilValidate.isEmpty(itemProductId)) {
                     continue;
@@ -1782,7 +1782,7 @@ public class ProductPromoWorker {
 
     protected static List<ShoppingCartItem> getCartItemsUsed(ShoppingCart cart, GenericValue productPromoAction) {
         List<ShoppingCartItem> cartItemsUsed = FastList.newInstance();
-        for(ShoppingCartItem cartItem : cart) {
+        for (ShoppingCartItem cartItem : cart) {
             BigDecimal quantityUsed = cartItem.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction);
             if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
                 cartItemsUsed.add(cartItem);
@@ -1793,7 +1793,7 @@ public class ProductPromoWorker {
 
     protected static BigDecimal getCartItemsUsedTotalAmount(ShoppingCart cart, GenericValue productPromoAction) {
         BigDecimal totalAmount = BigDecimal.ZERO;
-        for(ShoppingCartItem cartItem : cart) {
+        for (ShoppingCartItem cartItem : cart) {
             BigDecimal quantityUsed = cartItem.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction);
             if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) {
                 totalAmount = totalAmount.add(quantityUsed.multiply(cartItem.getBasePrice()));
@@ -1975,7 +1975,7 @@ public class ProductPromoWorker {
         List<GenericValue> productPromoProductsAction = FastList.newInstance();
         List<GenericValue> productPromoCategoriesAction = FastList.newInstance();
 
-        for(GenericValue productPromoProduct : productPromoProductsAll) {
+        for (GenericValue productPromoProduct : productPromoProductsAll) {
             // if the rule id is null then this is a global promo one, so always include
             if (!"_NA_".equals(productPromoProduct.getString("productPromoCondSeqId")) || "_NA_".equals(productPromoProduct.getString("productPromoRuleId"))) {
                 productPromoProductsCond.add(productPromoProduct);
@@ -1984,7 +1984,7 @@ public class ProductPromoWorker {
                 productPromoProductsAction.add(productPromoProduct);
             }
         }
-        for(GenericValue productPromoCategory : productPromoCategoriesAll) {
+        for (GenericValue productPromoCategory : productPromoCategoriesAll) {
             if (!"_NA_".equals(productPromoCategory.getString("productPromoCondSeqId")) || "_NA_".equals(productPromoCategory.getString("productPromoRuleId"))) {
                 productPromoCategoriesCond.add(productPromoCategory);
             }
@@ -2031,7 +2031,7 @@ public class ProductPromoWorker {
         Set<String> productCategoryIds = FastSet.newInstance();
         Map<String, List<Set<String>>> productCategoryGroupSetListMap = FastMap.newInstance();
 
-        for(GenericValue productPromoCategory : productPromoCategories) {
+        for (GenericValue productPromoCategory : productPromoCategories) {
             if (productPromoApplEnumId.equals(productPromoCategory.getString("productPromoApplEnumId"))) {
                 Set<String> tempCatIdSet = FastSet.newInstance();
                 if ("Y".equals(productPromoCategory.getString("includeSubCategories"))) {
@@ -2079,12 +2079,12 @@ public class ProductPromoWorker {
         // now handle the productCategoryGroupSetListMap
         // if a set has more than one category (because of an include sub-cats) then do an or
         // all lists will have more than category because of the pre-pass that was done, so and them together
-        for(Map.Entry<String, List<Set<String>>> entry : productCategoryGroupSetListMap.entrySet()) {
+        for (Map.Entry<String, List<Set<String>>> entry : productCategoryGroupSetListMap.entrySet()) {
             List<Set<String>> catIdSetList = entry.getValue();
             // get all productIds for this catIdSetList
             List<Set<String>> productIdSetList = FastList.newInstance();
 
-            for(Set<String> catIdSet : catIdSetList) {
+            for (Set<String> catIdSet : catIdSetList) {
                 // make a Set of productIds including all ids from all categories
                 Set<String> groupProductIdSet = FastSet.newInstance();
                 getAllProductIds(catIdSet, groupProductIdSet, delegator, nowTimestamp, true);
@@ -2094,7 +2094,7 @@ public class ProductPromoWorker {
             // now go through all productId sets and only include IDs that are in all sets
             // by definition if each id must be in all categories, then it must be in the first, so go through the first and drop each one that is not in all others
             Set<String> firstProductIdSet = productIdSetList.remove(0);
-            for(Set<String> productIdSet : productIdSetList) {
+            for (Set<String> productIdSet : productIdSetList) {
                 firstProductIdSet.retainAll(productIdSet);
             }
 
@@ -2130,11 +2130,11 @@ public class ProductPromoWorker {
     }
 
     protected static void getAllProductIds(Set<String> productCategoryIdSet, Set<String> productIdSet, Delegator delegator, Timestamp nowTimestamp, boolean include) throws GenericEntityException {
-        for(String productCategoryId : productCategoryIdSet) {
+        for (String productCategoryId : productCategoryIdSet) {
             // get all product category memebers, filter by date
             List<GenericValue> productCategoryMembers = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId), null, true);
             productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, nowTimestamp);
-            for(GenericValue productCategoryMember : productCategoryMembers) {
+            for (GenericValue productCategoryMember : productCategoryMembers) {
                 String productId = productCategoryMember.getString("productId");
                 if (include) {
                     productIdSet.add(productId);
@@ -2147,7 +2147,7 @@ public class ProductPromoWorker {
 
     protected static void handleProductPromoProducts(Set<String> productIds, List<GenericValue> productPromoProducts, String productPromoApplEnumId) throws GenericEntityException {
         boolean include = !"PPPA_EXCLUDE".equals(productPromoApplEnumId);
-        for(GenericValue productPromoProduct : productPromoProducts) {
+        for (GenericValue productPromoProduct : productPromoProducts) {
             if (productPromoApplEnumId.equals(productPromoProduct.getString("productPromoApplEnumId"))) {
                 String productId = productPromoProduct.getString("productId");
                 if (include) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java Thu Aug  8 12:28:01 2013
@@ -228,7 +228,7 @@ public class ShoppingListEvents {
             // include all items of child lists if flagged to do so
             if (includeChild) {
                 List<GenericValue> childShoppingLists = shoppingList.getRelated("ChildShoppingList", null, null, false);
-                for(GenericValue v : childShoppingLists) {
+                for (GenericValue v : childShoppingLists) {
                     List<GenericValue> items = v.getRelated("ShoppingListItem", null, null, false);
                     shoppingListItems.addAll(items);
                 }
@@ -258,7 +258,7 @@ public class ShoppingListEvents {
 
         // add the items
         StringBuilder eventMessage = new StringBuilder();
-        for(GenericValue shoppingListItem : shoppingListItems) {
+        for (GenericValue shoppingListItem : shoppingListItems) {
             String productId = shoppingListItem.getString("productId");
             BigDecimal quantity = shoppingListItem.getBigDecimal("quantity");
             Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
@@ -553,7 +553,7 @@ public class ShoppingListEvents {
     public static int makeListItemSurveyResp(Delegator delegator, GenericValue item, List<String> surveyResps) throws GenericEntityException {
         if (UtilValidate.isNotEmpty(surveyResps)) {
             int count = 0;
-            for(String responseId : surveyResps) {
+            for (String responseId : surveyResps) {
                 GenericValue listResp = delegator.makeValue("ShoppingListItemSurvey");
                 listResp.set("shoppingListId", item.getString("shoppingListId"));
                 listResp.set("shoppingListItemSeqId", item.getString("shoppingListItemSeqId"));
@@ -572,7 +572,7 @@ public class ShoppingListEvents {
     public static Map<String, List<String>> getItemSurveyInfos(List<GenericValue> items) {
         Map<String, List<String>> surveyInfos = FastMap.newInstance();
         if (UtilValidate.isNotEmpty(items)) {
-            for(GenericValue item : items) {
+            for (GenericValue item : items) {
                 String listId = item.getString("shoppingListId");
                 String itemId = item.getString("shoppingListItemSeqId");
                 surveyInfos.put(listId + "." + itemId, getItemSurveyInfo(item));
@@ -595,7 +595,7 @@ public class ShoppingListEvents {
         }
 
         if (UtilValidate.isNotEmpty(surveyResp)) {
-            for(GenericValue resp : surveyResp) {
+            for (GenericValue resp : surveyResp) {
                 responseIds.add(resp.getString("surveyResponseId"));
             }
         }

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=1511742&r1=1511741&r2=1511742&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 Thu Aug  8 12:28:01 2013
@@ -325,7 +325,7 @@ public class ShoppingListServices {
             }
 
             List<GenericValue> orderItems = orh.getOrderItems();
-            for(GenericValue orderItem : orderItems) {
+            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",
@@ -468,7 +468,7 @@ public class ShoppingListServices {
 
 
                 ProductConfigWrapper configWrapper = null;
-                for(GenericValue shoppingListItem : items) {
+                for (GenericValue shoppingListItem : items) {
                     String productId = shoppingListItem.getString("productId");
                     BigDecimal quantity = shoppingListItem.getBigDecimal("quantity");
                     Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
@@ -559,7 +559,7 @@ public class ShoppingListServices {
         String orderId = (String) context.get("orderId");
         try {
             List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId), null, false);
-            for(GenericValue orderItem : orderItems) {
+            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=1511742&r1=1511741&r2=1511742&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 Thu Aug  8 12:28:01 2013
@@ -95,7 +95,7 @@ public class OrderTestServices {
                 if (result.get("categoryMembers") != null) {
                     List<GenericValue> productCategoryMembers = UtilGenerics.checkList(result.get("categoryMembers"));
                     if (productCategoryMembers != null) {
-                        for(GenericValue prodCatMemb : productCategoryMembers) {
+                        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=1511742&r1=1511741&r2=1511742&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 Thu Aug  8 12:28:01 2013
@@ -361,7 +361,7 @@ public class ZipSalesServices {
         }
 
         if (ruleLookup != null) {
-            for(GenericValue rule : ruleLookup) {
+            for (GenericValue rule : ruleLookup) {
                 if (!taxShipping) {
                     // if we found an rule which passes no need to contine (all rules are ||)
                     break;

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Thu Aug  8 12:28:01 2013
@@ -1028,7 +1028,7 @@ public class CommunicationEventServices 
         // It's not clear what the "role" of this communication event should be, so we'll just put _NA_
         // check and see if this role was already created and ignore if true
         try {
-            for(Map<String, Object> result : parties) {
+            for (Map<String, Object> result : parties) {
                 String partyId = (String) result.get("partyId");
                 GenericValue commEventRole = delegator.findOne("CommunicationEventRole",
                         UtilMisc.toMap("communicationEventId", communicationEventId, "partyId", partyId, "roleTypeId", roleTypeId), false);
@@ -1050,7 +1050,7 @@ public class CommunicationEventServices 
     private static void createCommunicationEventWorkEffs(GenericValue userLogin, LocalDispatcher dispatcher, List<Map<String, Object>> workEffortInfos, String communicationEventId) {
         // create relationship between communication event and work efforts
         try {
-            for(Map<String, Object> result : workEffortInfos) {
+            for (Map<String, Object> result : workEffortInfos) {
                 String workEffortId = (String) result.get("workEffortId");
                 dispatcher.runSync("createCommunicationEventWorkEff", UtilMisc.toMap("workEffortId", workEffortId, "communicationEventId", communicationEventId, "userLogin", userLogin));
             }

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Thu Aug  8 12:28:01 2013
@@ -252,7 +252,7 @@ public class PartyServices {
                 // disable all userlogins for this user when the new status is disabled
                 if (("PARTY_DISABLED").equals(statusId)) {
                     List <GenericValue> userLogins = delegator.findByAnd("UserLogin", UtilMisc.toMap("partyId", partyId), null, false);
-                    for(GenericValue userLogin : userLogins) {
+                    for (GenericValue userLogin : userLogins) {
                         if (!"N".equals(userLogin.getString("enabled"))) {
                             userLogin.set("enabled", "N");
                             userLogin.store();
@@ -1898,7 +1898,7 @@ public class PartyServices {
         }
         
         try {
-            for(final CSVRecord rec : fmt.parse(csvReader)) {
+            for (final CSVRecord rec : fmt.parse(csvReader)) {
                 if (UtilValidate.isNotEmpty(rec.get("partyId"))) {
                     currentPartyId =  rec.get("partyId");
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java Thu Aug  8 12:28:01 2013
@@ -92,7 +92,7 @@ public class CatalogUrlFilter extends Co
                     productContentConds.add(EntityUtil.getFilterByDateExpr());
                     List<GenericValue> productContentInfos = delegator.findList("ProductContentAndInfo", EntityCondition.makeCondition(productContentConds), null, UtilMisc.toList("-fromDate"), null, true);
                     if (UtilValidate.isNotEmpty(productContentInfos)) {
-                        for(GenericValue productContentInfo : productContentInfos){
+                        for (GenericValue productContentInfo : productContentInfos){
                             String contentId = (String) productContentInfo.get("contentId");
                             List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAnd("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                             if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){
@@ -147,7 +147,7 @@ public class CatalogUrlFilter extends Co
                     productCategoryContentConds.add(EntityUtil.getFilterByDateExpr());
                     List<GenericValue> productCategoryContentInfos = delegator.findList("ProductCategoryContentAndInfo", EntityCondition.makeCondition(productCategoryContentConds), null, UtilMisc.toList("-fromDate"), null, true);
                     if (UtilValidate.isNotEmpty(productCategoryContentInfos)) {
-                        for(GenericValue productCategoryContentInfo : productCategoryContentInfos){
+                        for (GenericValue productCategoryContentInfo : productCategoryContentInfos){
                             String contentId = (String) productCategoryContentInfo.get("contentId");
                             List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAnd("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT"), null, true);
                             if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Thu Aug  8 12:28:01 2013
@@ -506,7 +506,7 @@ public class ProductConfigWrapper implem
         public ConfigOption getDefault() {
             String defaultConfigOptionId = configItemAssoc.getString("defaultConfigOptionId");
             if (UtilValidate.isNotEmpty(defaultConfigOptionId)) {
-                for(ConfigOption oneOption : getOptions()) {
+                for (ConfigOption oneOption : getOptions()) {
                     String currentConfigOptionId = oneOption.getId();
                     if (defaultConfigOptionId.compareToIgnoreCase(currentConfigOptionId) == 0 ) {
                         return oneOption;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Thu Aug  8 12:28:01 2013
@@ -190,7 +190,7 @@ public class ScaleImage {
                         } else if (newFileLocation.endsWith("/" + id)) {
                             try {
                                 File[] files = targetDir.listFiles(); 
-                                for(File file : files) {
+                                for (File file : files) {
                                     if (file.isFile() && file.getName().startsWith(id)) {
                                         file.delete();
                                     }
@@ -331,7 +331,7 @@ public class ScaleImage {
             }
 
             /* scale Image for each Size Type */
-            for(String sizeType : sizeTypeList) {
+            for (String sizeType : sizeTypeList) {
                 resultScaleImgMap.putAll(ImageTransform.scaleImage(bufImg, imgHeight, imgWidth, imgPropertyMap, sizeType, locale));
 
                 if (resultScaleImgMap.containsKey("responseMessage") && resultScaleImgMap.get("responseMessage").equals("success")) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Thu Aug  8 12:28:01 2013
@@ -369,7 +369,7 @@ public class ImageManagementServices {
             }
             
             /* scale Image for each Size Type */
-            for(String sizeType : sizeTypeList) {
+            for (String sizeType : sizeTypeList) {
                 resultScaleImgMap.putAll(ImageTransform.scaleImage(bufImg, imgHeight, imgWidth, imgPropertyMap, sizeType, locale));
                 
                 if (resultScaleImgMap.containsKey("responseMessage") && resultScaleImgMap.get("responseMessage").equals("success")) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Thu Aug  8 12:28:01 2013
@@ -528,7 +528,7 @@ public class PriceServices {
             if (UtilValidate.isNotEmpty(currencyDefaultUomId) && UtilValidate.isNotEmpty(currencyUomIdTo) && !currencyDefaultUomId.equals(currencyUomIdTo)) {
                 if(UtilValidate.isNotEmpty(result)){
                     Map<String, Object> convertPriceMap = FastMap.newInstance();
-                    for(Map.Entry<String, Object> entry : result.entrySet()) {
+                    for (Map.Entry<String, Object> entry : result.entrySet()) {
                         BigDecimal tempPrice = BigDecimal.ZERO;
                         if(entry.getKey() == "basePrice")
                             tempPrice = (BigDecimal) entry.getValue();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Thu Aug  8 12:28:01 2013
@@ -1032,7 +1032,7 @@ public class ProductServices {
                 } else if (!filenameToUse.contains(productId)) {
                     try {
                         File[] files = targetDir.listFiles(); 
-                        for(File file : files) {
+                        for (File file : files) {
                             if (file.isFile()) file.delete(); 
                         }
                     } catch (SecurityException e) {
@@ -1042,7 +1042,7 @@ public class ProductServices {
                 } else {
                     try {
                         File[] files = targetDir.listFiles(); 
-                        for(File file : files) {
+                        for (File file : files) {
                             if (file.isFile() && file.getName().startsWith(productId + "_View_" + viewNumber)) file.delete();
                         }
                     } catch (SecurityException e) {
@@ -1097,7 +1097,7 @@ public class ProductServices {
             /* now store the image versions created by ScaleImage.scaleImageInAllSize */
             /* have to shrink length of productContentTypeId, as otherwise value is too long for database field */
             Map<String,String> imageUrlMap = UtilGenerics.checkMap(resultResize.get("imageUrlMap"));
-            for( String sizeType : ScaleImage.sizeTypeList ) {
+            for ( String sizeType : ScaleImage.sizeTypeList ) {
                 imageUrl = imageUrlMap.get(sizeType);
                 if( UtilValidate.isNotEmpty(imageUrl)) {
                     result = addImageResource(dispatcher, delegator, context, imageUrl, "XTRA_IMG_" + viewNumber + "_" + sizeType.toUpperCase());

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java?rev=1511742&r1=1511741&r2=1511742&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/test/GenericTestCaseBase.java Thu Aug  8 12:28:01 2013
@@ -301,7 +301,7 @@ OUTER:
         if (!got.equals(wanted)) {
             Set<T> leftKeys = new LinkedHashSet<T>(wanted.keySet());
             HashSet<Object> rightKeys = new HashSet<Object>(gotMap.keySet());
-            for(T key: leftKeys) {
+            for (T key: leftKeys) {
                 assertTrue(msg + "got key(" + key + ")", rightKeys.remove(key));
                 assertEquals(msg + "key(" + key + ") value", wanted.get(key), gotMap.get(key));
             }