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

svn commit: r712913 - in /ofbiz/trunk/applications/product/src/org/ofbiz: product/category/ product/inventory/ product/price/ product/product/ product/spreadsheetimport/ product/store/ product/subscription/ product/test/ shipment/packing/ shipment/ship...

Author: doogie
Date: Mon Nov 10 18:14:00 2008
New Revision: 712913

URL: http://svn.apache.org/viewvc?rev=712913&view=rev
Log:
s/new (Boolean|Byte|Double|Float|Integer|Long|Short)\(/\1.valueOf(/g

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Mon Nov 10 18:14:00 2008
@@ -108,7 +108,7 @@
             while (i.hasNext()) {
                 GenericValue v = (GenericValue) i.next();
                 if (v.getString("productId").equals(productId)) {
-                    index = new Integer(productCategoryMembers.indexOf(v));
+                    index = Integer.valueOf(productCategoryMembers.indexOf(v));
                 }
             }
         }
@@ -349,11 +349,11 @@
         }
 
         Map result = FastMap.newInstance();
-        result.put("viewIndex", new Integer(viewIndex));
-        result.put("viewSize", new Integer(viewSize));
-        result.put("lowIndex", new Integer(lowIndex));
-        result.put("highIndex", new Integer(highIndex));
-        result.put("listSize", new Integer(listSize));
+        result.put("viewIndex", Integer.valueOf(viewIndex));
+        result.put("viewSize", Integer.valueOf(viewSize));
+        result.put("lowIndex", Integer.valueOf(lowIndex));
+        result.put("highIndex", Integer.valueOf(highIndex));
+        result.put("listSize", Integer.valueOf(listSize));
         if (productCategory != null) result.put("productCategory", productCategory);
         if (productCategoryMembers != null) result.put("productCategoryMembers", productCategoryMembers);
         return result;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Mon Nov 10 18:14:00 2008
@@ -102,15 +102,15 @@
                 // NOTE: atp should always be <= qoh, so if xfer < atp, then xfer < qoh, so no need to check/handle that
                 // however, if atp < qoh && atp == xferQty, then we still need to split; oh, but no need to check atp == xferQty in the second part because if it isn't greater and isn't less, then it is equal
                 if (xferQty.doubleValue() < atp.doubleValue() || atp.doubleValue() < qoh.doubleValue()) {
-                    Double negXferQty = new Double(-xferQty.doubleValue());
+                    Double negXferQty = Double.valueOf(-xferQty.doubleValue());
                     // NOTE: new inventory items should always be created calling the
                     //       createInventoryItem service because in this way we are sure
                     //       that all the relevant fields are filled with default values.
                     //       However, the code here should work fine because all the values
                     //       for the new inventory item are inerited from the existing item.
                     newItem = GenericValue.create(inventoryItem);
-                    newItem.set("availableToPromiseTotal", new Double(0));
-                    newItem.set("quantityOnHandTotal", new Double(0));
+                    newItem.set("availableToPromiseTotal", Double.valueOf(0));
+                    newItem.set("quantityOnHandTotal", Double.valueOf(0));
                     
                     delegator.createSetNextSeqId(newItem);
                     
@@ -152,7 +152,7 @@
                 inventoryItemToClear.refresh();
                 double atp = inventoryItemToClear.get("availableToPromiseTotal") == null ? 0 : inventoryItemToClear.getDouble("availableToPromiseTotal").doubleValue();
                 if (atp != 0) {
-                    Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", new Double(-atp), 
+                    Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", Double.valueOf(-atp), 
                             "inventoryItemId", inventoryItemToClear.get("inventoryItemId"), "userLogin", userLogin);
                     try {
                         Map result = dctx.getDispatcher().runSync("createInventoryItemDetail", createDetailMap);
@@ -216,7 +216,7 @@
             // add an adjusting InventoryItemDetail so set ATP back to QOH: ATP = ATP + (QOH - ATP), diff = QOH - ATP
             double atp = inventoryItem.get("availableToPromiseTotal") == null ? 0 : inventoryItem.getDouble("availableToPromiseTotal").doubleValue();
             double qoh = inventoryItem.get("quantityOnHandTotal") == null ? 0 : inventoryItem.getDouble("quantityOnHandTotal").doubleValue();
-            Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", new Double(qoh - atp), 
+            Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", Double.valueOf(qoh - atp), 
                     "inventoryItemId", inventoryItem.get("inventoryItemId"), "userLogin", userLogin);
             try {
                 Map result = dctx.getDispatcher().runSync("createInventoryItemDetail", createDetailMap);
@@ -306,7 +306,7 @@
             // add an adjusting InventoryItemDetail so set ATP back to QOH: ATP = ATP + (QOH - ATP), diff = QOH - ATP
             double atp = inventoryItem.get("availableToPromiseTotal") == null ? 0 : inventoryItem.getDouble("availableToPromiseTotal").doubleValue();
             double qoh = inventoryItem.get("quantityOnHandTotal") == null ? 0 : inventoryItem.getDouble("quantityOnHandTotal").doubleValue();
-            Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", new Double(qoh - atp), 
+            Map createDetailMap = UtilMisc.toMap("availableToPromiseDiff", Double.valueOf(qoh - atp), 
                                                  "inventoryItemId", inventoryItem.get("inventoryItemId"),
                                                  "userLogin", userLogin);
             try {
@@ -360,7 +360,7 @@
         // find all inventory items w/ a negative ATP
         List inventoryItems = null;
         try {
-            EntityExpr ee = EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0));
+            EntityExpr ee = EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, Double.valueOf(0));
             inventoryItems = delegator.findList("InventoryItem", ee, null, null, null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Trouble getting inventory items", module);
@@ -649,8 +649,8 @@
         String facilityId = (String)context.get("facilityId");
         String statusId = (String)context.get("statusId");
         
-        Double availableToPromiseTotal = new Double(0);
-        Double quantityOnHandTotal = new Double(0);
+        Double availableToPromiseTotal = Double.valueOf(0);
+        Double quantityOnHandTotal = Double.valueOf(0);
         
         if (UtilValidate.isNotEmpty(productAssocList)) {
            // minimum QOH and ATP encountered
@@ -666,7 +666,7 @@
                // if there is no quantity for the associated product in ProductAssoc entity, default it to 1.0
                if (assocQuantity == null) {
                    Debug.logWarning("ProductAssoc from [" + productAssoc.getString("productId") + "] to [" + productAssoc.getString("productIdTo") + "] has no quantity, assuming 1.0", module);
-                   assocQuantity = new Double(1.0);
+                   assocQuantity = Double.valueOf(1.0);
                }
                
                // figure out the inventory available for this associated product
@@ -704,8 +704,8 @@
                }
            }
           // the final QOH and ATP quantities are the minimum of all the products 
-          quantityOnHandTotal = new Double(minQuantityOnHandTotal);
-          availableToPromiseTotal = new Double(minAvailableToPromiseTotal);
+          quantityOnHandTotal = Double.valueOf(minQuantityOnHandTotal);
+          availableToPromiseTotal = Double.valueOf(minAvailableToPromiseTotal);
         }
         
         Map result = ServiceUtil.returnSuccess();
@@ -794,10 +794,10 @@
                 }
             }
 
-            atpMap.put(productId, new Double(atp));
-            qohMap.put(productId, new Double(qoh));
-            mktgPkgAtpMap.put(productId, new Double(mktgPkgAtp));
-            mktgPkgQohMap.put(productId, new Double(mktgPkgQoh));
+            atpMap.put(productId, Double.valueOf(atp));
+            qohMap.put(productId, Double.valueOf(qoh));
+            mktgPkgAtpMap.put(productId, Double.valueOf(mktgPkgAtp));
+            mktgPkgQohMap.put(productId, Double.valueOf(mktgPkgQoh));
         }
 
         results.put("availableToPromiseMap", atpMap);
@@ -847,7 +847,7 @@
         // filter for quantities
         int minimumStockInt = 0;
         if (minimumStock != null) {
-            minimumStockInt = new Double(minimumStock).intValue();
+            minimumStockInt = Double.valueOf(minimumStock).intValue();
         }
 
         int quantityOnHandTotalInt = 0;
@@ -865,10 +865,10 @@
         double quantityOnOrder = InventoryWorker.getOutstandingPurchasedQuantity(productId, delegator);
         result.put("totalQuantityOnHand", resultOutput.get("quantityOnHandTotal").toString());
         result.put("totalAvailableToPromise", resultOutput.get("availableToPromiseTotal").toString());
-        result.put("quantityOnOrder", new Double(quantityOnOrder));
+        result.put("quantityOnOrder", Double.valueOf(quantityOnOrder));
     
-        result.put("offsetQOHQtyAvailable", new Integer(offsetQOHQtyAvailable));
-        result.put("offsetATPQtyAvailable", new Integer(offsetATPQtyAvailable));
+        result.put("offsetQOHQtyAvailable", Integer.valueOf(offsetQOHQtyAvailable));
+        result.put("offsetATPQtyAvailable", Integer.valueOf(offsetATPQtyAvailable));
     
         List productPrices = null;
         try {
@@ -903,9 +903,9 @@
             salesUsageViewEntity.addMemberEntity("OH", "OrderHeader");
             salesUsageViewEntity.addMemberEntity("ItIss", "ItemIssuance");
             salesUsageViewEntity.addMemberEntity("InvIt", "InventoryItem");
-            salesUsageViewEntity.addViewLink("OI", "OH", new Boolean(false), ModelKeyMap.makeKeyMapList("orderId"));
-            salesUsageViewEntity.addViewLink("OI", "ItIss", new Boolean(false), ModelKeyMap.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"));
-            salesUsageViewEntity.addViewLink("ItIss", "InvIt", new Boolean(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
+            salesUsageViewEntity.addViewLink("OI", "OH", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("orderId"));
+            salesUsageViewEntity.addViewLink("OI", "ItIss", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("orderId", "orderId", "orderItemSeqId", "orderItemSeqId"));
+            salesUsageViewEntity.addViewLink("ItIss", "InvIt", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
             salesUsageViewEntity.addAlias("OI", "productId");
             salesUsageViewEntity.addAlias("OH", "statusId");
             salesUsageViewEntity.addAlias("OH", "orderTypeId");
@@ -918,8 +918,8 @@
             productionUsageViewEntity.addMemberEntity("WEIA", "WorkEffortInventoryAssign");
             productionUsageViewEntity.addMemberEntity("WE", "WorkEffort");
             productionUsageViewEntity.addMemberEntity("II", "InventoryItem");
-            productionUsageViewEntity.addViewLink("WEIA", "WE", new Boolean(false), ModelKeyMap.makeKeyMapList("workEffortId"));
-            productionUsageViewEntity.addViewLink("WEIA", "II", new Boolean(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
+            productionUsageViewEntity.addViewLink("WEIA", "WE", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("workEffortId"));
+            productionUsageViewEntity.addViewLink("WEIA", "II", Boolean.valueOf(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
             productionUsageViewEntity.addAlias("WEIA", "quantity");
             productionUsageViewEntity.addAlias("WE", "actualCompletionDate");
             productionUsageViewEntity.addAlias("WE", "workEffortTypeId");
@@ -1004,7 +1004,7 @@
                 e.printStackTrace();
             }
     
-            result.put("usageQuantity", new Double((salesUsageQuantity + productionUsageQuantity)));
+            result.put("usageQuantity", Double.valueOf((salesUsageQuantity + productionUsageQuantity)));
 
         }
         return result;

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=712913&r1=712912&r2=712913&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 Mon Nov 10 18:14:00 2008
@@ -193,7 +193,7 @@
         }
 
         Double quantityDbl = (Double) context.get("quantity");
-        if (quantityDbl == null) quantityDbl = new Double(1.0);
+        if (quantityDbl == null) quantityDbl = Double.valueOf(1.0);
         double quantity = quantityDbl.doubleValue();
 
         Double amountDbl = (Double) context.get("amount");
@@ -543,14 +543,14 @@
                 validPriceFound = true;
             }
 
-            result.put("basePrice", new Double(defaultPrice));
-            result.put("price", new Double(defaultPrice));
-            result.put("defaultPrice", new Double(defaultPrice));
+            result.put("basePrice", Double.valueOf(defaultPrice));
+            result.put("price", Double.valueOf(defaultPrice));
+            result.put("defaultPrice", Double.valueOf(defaultPrice));
             result.put("competitivePrice", competitivePriceValue != null ? competitivePriceValue.getDouble("price") : null);
             result.put("averageCost", averageCostValue != null ? averageCostValue.getDouble("price") : null);
             result.put("promoPrice", promoPriceValue != null ? promoPriceValue.getDouble("price") : null);
             result.put("specialPromoPrice", specialPromoPriceValue != null ? specialPromoPriceValue.getDouble("price") : null);
-            result.put("validPriceFound", new Boolean(validPriceFound));
+            result.put("validPriceFound", Boolean.valueOf(validPriceFound));
             result.put("isSale", Boolean.FALSE);
             result.put("orderItemPriceInfos", orderItemPriceInfos);
 
@@ -581,7 +581,7 @@
                             if ("PRIP_QUANTITY".equals(productPriceCond.getString("inputParamEnumId"))) {
                                 foundQuantityInputParam = true;
                             } else {
-                                if (!checkPriceCondition(productPriceCond, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, new Double(quantity), listPriceDbl.doubleValue(), currencyUomId, delegator, nowTimestamp)) {
+                                if (!checkPriceCondition(productPriceCond, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, Double.valueOf(quantity), listPriceDbl.doubleValue(), currencyUomId, delegator, nowTimestamp)) {
                                     allExceptQuantTrue = false;
                                 }
                             }
@@ -627,7 +627,7 @@
                     Map calcResults = calcPriceResultFromRules(allProductPriceRules, listPriceDbl.doubleValue(), defaultPrice, promoPrice, 
                         wholesalePrice, maximumPriceValue, minimumPriceValue, validPriceFound, 
                         averageCostValue, productId, virtualProductId, prodCatalogId, productStoreGroupId, 
-                        webSiteId, partyId, new Double(1.0), currencyUomId, delegator, nowTimestamp);
+                        webSiteId, partyId, Double.valueOf(1.0), currencyUomId, delegator, nowTimestamp);
                     result.putAll(calcResults);
                     // The orderItemPriceInfos out parameter requires a special treatment:
                     // the list of OrderItemPriceInfos generated by the price rule is appended to
@@ -645,7 +645,7 @@
                     Map calcResults = calcPriceResultFromRules(allProductPriceRules, listPriceDbl.doubleValue(), defaultPrice, promoPrice, 
                         wholesalePrice, maximumPriceValue, minimumPriceValue, validPriceFound, 
                         averageCostValue, productId, virtualProductId, prodCatalogId, productStoreGroupId, 
-                        webSiteId, partyId, new Double(quantity), currencyUomId, delegator, nowTimestamp);
+                        webSiteId, partyId, Double.valueOf(quantity), currencyUomId, delegator, nowTimestamp);
                     result.putAll(calcResults);
                     // The orderItemPriceInfos out parameter requires a special treatment:
                     // the list of OrderItemPriceInfos generated by the price rule is appended to
@@ -1080,7 +1080,7 @@
 
                     orderItemPriceInfo.set("productPriceRuleId", productPriceAction.get("productPriceRuleId"));
                     orderItemPriceInfo.set("productPriceActionSeqId", productPriceAction.get("productPriceActionSeqId"));
-                    orderItemPriceInfo.set("modifyAmount", new Double(modifyAmount));
+                    orderItemPriceInfo.set("modifyAmount", Double.valueOf(modifyAmount));
                     orderItemPriceInfo.set("rateCode", productPriceAction.get("rateCode"));
                     // make sure description is <= than 250 chars
                     String priceInfoDescriptionString = priceInfoDescription.toString();
@@ -1141,14 +1141,14 @@
 
         if (Debug.verboseOn()) Debug.logVerbose("Final Calculated price: " + price + ", rules: " + totalRules + ", conds: " + totalConds + ", actions: " + totalActions, module);
 
-        calcResults.put("basePrice", new Double(price));
-        calcResults.put("price", new Double(price));
-        calcResults.put("listPrice", new Double(listPrice));
-        calcResults.put("defaultPrice", new Double(defaultPrice));
-        calcResults.put("averageCost", new Double(averageCost));
+        calcResults.put("basePrice", Double.valueOf(price));
+        calcResults.put("price", Double.valueOf(price));
+        calcResults.put("listPrice", Double.valueOf(listPrice));
+        calcResults.put("defaultPrice", Double.valueOf(defaultPrice));
+        calcResults.put("averageCost", Double.valueOf(averageCost));
         calcResults.put("orderItemPriceInfos", orderItemPriceInfos);
-        calcResults.put("isSale", new Boolean(isSale));
-        calcResults.put("validPriceFound", new Boolean(validPriceFound));
+        calcResults.put("isSale", Boolean.valueOf(isSale));
+        calcResults.put("validPriceFound", Boolean.valueOf(validPriceFound));
         
         return calcResults;
     }
@@ -1296,7 +1296,7 @@
                 compare = 1;
             }
         } else if ("PRIP_LIST_PRICE".equals(productPriceCond.getString("inputParamEnumId"))) {
-            Double listPriceValue = new Double(listPrice);
+            Double listPriceValue = Double.valueOf(listPrice);
 
             compare = listPriceValue.compareTo(Double.valueOf(productPriceCond.getString("condValue")));
         } else if ("PRIP_CURRENCY_UOMID".equals(productPriceCond.getString("inputParamEnumId"))) {
@@ -1381,7 +1381,7 @@
                     GenericValue orderItemPriceInfo = delegator.makeValue("OrderItemPriceInfo");
                     //orderItemPriceInfo.set("productPriceRuleId", productPriceAction.get("productPriceRuleId"));
                     //orderItemPriceInfo.set("productPriceActionSeqId", productPriceAction.get("productPriceActionSeqId"));
-                    //orderItemPriceInfo.set("modifyAmount", new Double(modifyAmount));
+                    //orderItemPriceInfo.set("modifyAmount", Double.valueOf(modifyAmount));
                     // make sure description is <= than 250 chars
                     String priceInfoDescriptionString = priceInfoDescription.toString();
                     if (priceInfoDescriptionString.length() > 250) {
@@ -1436,8 +1436,8 @@
             }
         }
 
-        result.put("price", new Double(price));
-        result.put("validPriceFound", new Boolean(validPriceFound));
+        result.put("price", Double.valueOf(price));
+        result.put("validPriceFound", Boolean.valueOf(validPriceFound));
         result.put("orderItemPriceInfos", orderItemPriceInfos);
         return result;
     }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java Mon Nov 10 18:14:00 2008
@@ -94,7 +94,7 @@
         } catch (Exception e) {
             Debug.logWarning("Could not parse weight number: " + e.toString(), module);
         }
-        keywords.put(product.getString("productId").toLowerCase(), new Long(pidWeight));
+        keywords.put(product.getString("productId").toLowerCase(), Long.valueOf(pidWeight));
 
         // Product fields - default is 0 if not found in the properties file
         if (!"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.Product.productName", "0"))) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Mon Nov 10 18:14:00 2008
@@ -242,7 +242,7 @@
             double totalSeconds = ((double)endMillis - (double)startMillis)/1000.0;
 
             // store info about results in the database, attached to the user's visitId, if specified
-            this.saveSearchResultInfo(new Long(productIds.size()), new Double(totalSeconds));
+            this.saveSearchResultInfo(Long.valueOf(productIds.size()), Double.valueOf(totalSeconds));
 
             return productIds;
         }
@@ -669,7 +669,7 @@
                 resultSortOrder.setSortOrder(this);
             }
 
-            dynamicViewEntity.addAlias("PROD", "mainProductId", "productId", null, null, new Boolean(productIdGroupBy), null);
+            dynamicViewEntity.addAlias("PROD", "mainProductId", "productId", null, null, Boolean.valueOf(productIdGroupBy), null);
             EntityCondition whereCondition = EntityCondition.makeCondition(entityConditionList, EntityOperator.AND);
             EntityFindOptions efo = new EntityFindOptions();
             efo.setDistinct(true);
@@ -735,7 +735,7 @@
                     if (this.resultOffset != null) {
                         failTotal = this.resultOffset.intValue() - 1;
                     }
-                    this.totalResults = new Integer(failTotal);
+                    this.totalResults = Integer.valueOf(failTotal);
                     return productIds;
                 }
 
@@ -779,7 +779,7 @@
                     // we weren't at the end, so go to the end and get the index
                     //Debug.logInfo("Getting totalResults from ending index - before last() currentIndex=" + eli.currentIndex(), module);
                     if (eli.last()) {
-                        this.totalResults = new Integer(eli.currentIndex());
+                        this.totalResults = Integer.valueOf(eli.currentIndex());
                         //Debug.logInfo("Getting totalResults from ending index - after last() currentIndex=" + eli.currentIndex(), module);
                     }
                 }
@@ -788,7 +788,7 @@
                     if (this.resultOffset != null) {
                         total += (this.resultOffset.intValue() - 1);
                     }
-                    this.totalResults = new Integer(total);
+                    this.totalResults = Integer.valueOf(total);
                 }
 
                 Debug.logInfo("Got search values, numRetreived=" + numRetreived + ", totalResults=" + totalResults + ", maxResults=" + maxResults + ", resultOffset=" + resultOffset + ", duplicatesFound(in the current results)=" + duplicatesFound, module);
@@ -2162,7 +2162,7 @@
             }
         }
 
-        dynamicViewEntity.addAlias("PROD", "productId", null, null, null, new Boolean(productIdGroupBy), null);
+        dynamicViewEntity.addAlias("PROD", "productId", null, null, null, Boolean.valueOf(productIdGroupBy), null);
         EntityCondition whereCondition = EntityCondition.makeCondition(entityConditionList, EntityOperator.AND);
         EntityFindOptions efo = new EntityFindOptions();
         efo.setDistinct(true);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Mon Nov 10 18:14:00 2008
@@ -322,7 +322,7 @@
                     pfa.create();
                     numAdded++;
                 }
-                Map messageMap = UtilMisc.toMap("numAdded", new Integer(numAdded), "productFeatureId", productFeatureId);
+                Map messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId);
                 String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.added_param_features", messageMap, locale) + ".";
                 request.setAttribute("_EVENT_MESSAGE_", eventMsg);
                 eli.close();
@@ -372,7 +372,7 @@
                     String productId = searchResultView.getString("mainProductId");
                     numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId));
                 }
-                Map messageMap = UtilMisc.toMap("numRemoved", new Integer(numRemoved), "productFeatureId", productFeatureId);
+                Map messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId);
                 String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.removed_param_features", messageMap, locale) + ".";
                 request.setAttribute("_EVENT_MESSAGE_", eventMsg);
                 eli.close();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Mon Nov 10 18:14:00 2008
@@ -168,7 +168,7 @@
             } catch (Exception e) {
                 Debug.logError(e, "Error in formatting of VIEW_INDEX [" + viewIndexStr + "], setting to 20", module);
                 if (this.viewIndex == null) {
-                    this.setViewIndex(new Integer(20));
+                    this.setViewIndex(Integer.valueOf(20));
                 }
             }
         }
@@ -200,7 +200,7 @@
             } catch (Exception e) {
                 Debug.logError(e, "Error in formatting of VIEW_SIZE [" + viewSizeStr + "], setting to 20", module);
                 if (this.viewSize == null) {
-                    this.setViewSize(new Integer(20));
+                    this.setViewSize(Integer.valueOf(20));
                 }
             }
         }
@@ -233,7 +233,7 @@
          */
         public void setPreviousViewSize(Integer previousViewSize) {
             if (previousViewSize == null) {
-                this.previousViewSize = new Integer(20);
+                this.previousViewSize = Integer.valueOf(20);
             } else {
                 this.previousViewSize = previousViewSize;
             }
@@ -552,7 +552,7 @@
             String searchCategoryId = (String) parameters.get("SEARCH_CATEGORY_ID");
             String searchSubCategories = (String) parameters.get("SEARCH_SUB_CATEGORIES");
             String searchCategoryExc = (String) parameters.get("SEARCH_CATEGORY_EXC");
-            Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : new Boolean(!"N".equals(searchCategoryExc));
+            Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchCategoryExc));
             searchAddConstraint(new ProductSearch.CategoryConstraint(searchCategoryId, !"N".equals(searchSubCategories), exclude), session);
             constraintsChanged = true;
         }
@@ -562,7 +562,7 @@
                 String searchCategoryId = (String) parameters.get("SEARCH_CATEGORY_ID" + catNum);
                 String searchSubCategories = (String) parameters.get("SEARCH_SUB_CATEGORIES" + catNum);
                 String searchCategoryExc = (String) parameters.get("SEARCH_CATEGORY_EXC" + catNum);
-                Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : new Boolean(!"N".equals(searchCategoryExc));
+                Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchCategoryExc));
                 searchAddConstraint(new ProductSearch.CategoryConstraint(searchCategoryId, !"N".equals(searchSubCategories), exclude), session);
                 constraintsChanged = true;
             }
@@ -574,7 +574,7 @@
                 String searchCategoryId = (String) parameters.get("S_CAT" + catNum);
                 String searchSubCategories = (String) parameters.get("S_CSB" + catNum);
                 String searchCategoryExc = (String) parameters.get("S_CEX" + catNum);
-                Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : new Boolean(!"N".equals(searchCategoryExc));
+                Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchCategoryExc));
                 searchAddConstraint(new ProductSearch.CategoryConstraint(searchCategoryId, !"N".equals(searchSubCategories), exclude), session);
                 constraintsChanged = true;
             }
@@ -619,7 +619,7 @@
                 if (productFeatureId != null && productFeatureId.length() > 0) {
                     String paramNameExt = parameterName.substring("SEARCH_FEAT".length());
                     String searchCategoryExc = (String) parameters.get("SEARCH_FEAT_EXC" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : new Boolean(!"N".equals(searchCategoryExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchCategoryExc));
                     //Debug.logInfo("parameterName=" + parameterName + ", paramNameExt=" + paramNameExt + ", searchCategoryExc=" + searchCategoryExc + ", exclude=" + exclude, module);
                     searchAddConstraint(new ProductSearch.FeatureConstraint(productFeatureId, exclude), session);
                     constraintsChanged = true;
@@ -631,7 +631,7 @@
                 if (productFeatureId != null && productFeatureId.length() > 0) {
                     String paramNameExt = parameterName.substring("S_PFI".length());
                     String searchCategoryExc = (String) parameters.get("S_PFX" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : new Boolean(!"N".equals(searchCategoryExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchCategoryExc));
                     //Debug.logInfo("parameterName=" + parameterName + ", paramNameExt=" + paramNameExt + ", searchCategoryExc=" + searchCategoryExc + ", exclude=" + exclude, module);
                     searchAddConstraint(new ProductSearch.FeatureConstraint(productFeatureId, exclude), session);
                     constraintsChanged = true;
@@ -644,7 +644,7 @@
                 if (productFeatureCategoryId != null && productFeatureCategoryId.length() > 0) {
                     String paramNameExt = parameterName.substring("SEARCH_PROD_FEAT_CAT".length());
                     String searchProdFeatureCategoryExc = (String) parameters.get("SEARCH_PROD_FEAT_CAT_EXC" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureCategoryExc) ? null : new Boolean(!"N".equals(searchProdFeatureCategoryExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchProdFeatureCategoryExc));
                     searchAddConstraint(new ProductSearch.FeatureCategoryConstraint(productFeatureCategoryId, exclude), session);
                     constraintsChanged = true;
                 }
@@ -655,7 +655,7 @@
                 if (productFeatureCategoryId != null && productFeatureCategoryId.length() > 0) {
                     String paramNameExt = parameterName.substring("S_FCI".length());
                     String searchProdFeatureCategoryExc = (String) parameters.get("S_FCX" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureCategoryExc) ? null : new Boolean(!"N".equals(searchProdFeatureCategoryExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureCategoryExc) ? null : Boolean.valueOf(!"N".equals(searchProdFeatureCategoryExc));
                     searchAddConstraint(new ProductSearch.FeatureCategoryConstraint(productFeatureCategoryId, exclude), session);
                     constraintsChanged = true;
                 }
@@ -667,7 +667,7 @@
                 if (productFeatureGroupId != null && productFeatureGroupId.length() > 0) {
                     String paramNameExt = parameterName.substring("SEARCH_PROD_FEAT_GRP".length());
                     String searchProdFeatureGroupExc = (String) parameters.get("SEARCH_PROD_FEAT_GRP_EXC" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureGroupExc) ? null : new Boolean(!"N".equals(searchProdFeatureGroupExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureGroupExc) ? null : Boolean.valueOf(!"N".equals(searchProdFeatureGroupExc));
                     searchAddConstraint(new ProductSearch.FeatureGroupConstraint(productFeatureGroupId, exclude), session);
                     constraintsChanged = true;
                 }
@@ -678,7 +678,7 @@
                 if (productFeatureGroupId != null && productFeatureGroupId.length() > 0) {
                     String paramNameExt = parameterName.substring("S_FGI".length());
                     String searchProdFeatureGroupExc = (String) parameters.get("S_FGX" + paramNameExt);
-                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureGroupExc) ? null : new Boolean(!"N".equals(searchProdFeatureGroupExc));
+                    Boolean exclude = UtilValidate.isEmpty(searchProdFeatureGroupExc) ? null : Boolean.valueOf(!"N".equals(searchProdFeatureGroupExc));
                     searchAddConstraint(new ProductSearch.FeatureGroupConstraint(productFeatureGroupId, exclude), session);
                     constraintsChanged = true;
                 }
@@ -919,8 +919,8 @@
                 resultOffsetInt = 1;
             }
             int maxResultsInt = viewSize - addOnTopListSize;
-            Integer resultOffset = new Integer(resultOffsetInt);
-            Integer maxResults = new Integer(maxResultsInt);
+            Integer resultOffset = Integer.valueOf(resultOffsetInt);
+            Integer maxResults = Integer.valueOf(maxResultsInt);
 
             ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(request);
 
@@ -953,11 +953,11 @@
         Map result = FastMap.newInstance();
 
         result.put("productIds", productIds);
-        result.put("viewIndex", new Integer(viewIndex));
-        result.put("viewSize", new Integer(viewSize));
-        result.put("listSize", new Integer(listSize));
-        result.put("lowIndex", new Integer(lowIndex));
-        result.put("highIndex", new Integer(highIndex));
+        result.put("viewIndex", Integer.valueOf(viewIndex));
+        result.put("viewSize", Integer.valueOf(viewSize));
+        result.put("listSize", Integer.valueOf(listSize));
+        result.put("lowIndex", Integer.valueOf(lowIndex));
+        result.put("highIndex", Integer.valueOf(highIndex));
         result.put("paging", paging);
         result.put("previousViewSize", previousViewSize);
         result.put("searchConstraintStrings", searchConstraintStrings);

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=712913&r1=712912&r2=712913&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 Mon Nov 10 18:14:00 2008
@@ -249,7 +249,7 @@
 
             // next check inventory for each item: if inventory is not required or is available
             try {
-                Map invReqResult = dispatcher.runSync("isStoreInventoryAvailableOrNotRequired", UtilMisc.<String, Object>toMap("productStoreId", productStoreId, "productId", productIdTo, "quantity", new Double(1.0)));
+                Map invReqResult = dispatcher.runSync("isStoreInventoryAvailableOrNotRequired", UtilMisc.<String, Object>toMap("productStoreId", productStoreId, "productId", productIdTo, "quantity", Double.valueOf(1.0)));
                 if (ServiceUtil.isError(invReqResult)) {
                     return ServiceUtil.returnError("Error calling the isStoreInventoryRequired when building the variant product tree.", null, null, invReqResult);
                 } else if ("Y".equals((String) invReqResult.get("availableOrNotRequired"))) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java Mon Nov 10 18:14:00 2008
@@ -195,7 +195,7 @@
                     EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, nowTimestamp),
                     EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null)
                     ), EntityOperator.AND);
-            EntityCondition havingCond = EntityCondition.makeCondition("productIdCount", EntityOperator.GREATER_THAN, new Long(1));
+            EntityCondition havingCond = EntityCondition.makeCondition("productIdCount", EntityOperator.GREATER_THAN, Long.valueOf(1));
             EntityListIterator eli = delegator.findListIteratorByCondition(dve, condition, havingCond, UtilMisc.toList("productId", "productCategoryId", "productIdCount"), null, null);
             GenericValue pcm = null;
             int numSoFar = 0;
@@ -256,7 +256,7 @@
                     EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "PRODUCT_VARIANT"),
                     EntityCondition.makeCondition(EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.GREATER_THAN, nowTimestamp))
                     ), EntityOperator.AND);
-            EntityCondition havingCond = EntityCondition.makeCondition("productIdToCount", EntityOperator.EQUALS, new Long(1));
+            EntityCondition havingCond = EntityCondition.makeCondition("productIdToCount", EntityOperator.EQUALS, Long.valueOf(1));
             EntityListIterator eliOne = delegator.findListIteratorByCondition(dve, condition, havingCond, UtilMisc.toList("productId", "productIdToCount"), null, null);
             List valueList = eliOne.getCompleteList();
             eliOne.close();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Nov 10 18:14:00 2008
@@ -683,7 +683,7 @@
 
         // null check
         if (productEntityRating == null) {
-            productEntityRating = new Double(0);
+            productEntityRating = Double.valueOf(0);
         }
         if (entityFieldType == null) {
             entityFieldType = new String();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java Mon Nov 10 18:14:00 2008
@@ -53,8 +53,8 @@
         fields.put("productId", productId);
         fields.put("ownerPartyId", "Company");
         fields.put("facilityId", "WebStoreWarehouse");
-        fields.put("quantityOnHandTotal", new Double(quantityOnHand));
-        fields.put("availableToPromiseTotal", new Double(quantityOnHand));
+        fields.put("quantityOnHandTotal", Double.valueOf(quantityOnHand));
+        fields.put("availableToPromiseTotal", Double.valueOf(quantityOnHand));
         return fields;
     }
 

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Mon Nov 10 18:14:00 2008
@@ -603,7 +603,7 @@
             return false;
         }
 
-        if (quantity == null) quantity = new Double(1);
+        if (quantity == null) quantity = Double.valueOf(1);
 
         String productStoreId = productStore.getString("productStoreId");
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
@@ -616,7 +616,7 @@
                     Debug.logError("Error calling isStoreInventoryRequired service, result is: " + invReqResult, module);
                     return false;
                 }
-                requiredOkay = new Boolean(wantRequired.booleanValue() == "Y".equals((String) invReqResult.get("requireInventory")));
+                requiredOkay = Boolean.valueOf(wantRequired.booleanValue() == "Y".equals((String) invReqResult.get("requireInventory")));
             }
 
             Boolean availableOkay = null;
@@ -626,7 +626,7 @@
                     Debug.logError("Error calling isStoreInventoryAvailable service, result is: " + invAvailResult, module);
                     return false;
                 }
-                availableOkay = new Boolean(wantAvailable.booleanValue() == "Y".equals((String) invAvailResult.get("available")));
+                availableOkay = Boolean.valueOf(wantAvailable.booleanValue() == "Y".equals((String) invAvailResult.get("available")));
             }
 
             if ((requiredOkay == null || requiredOkay.booleanValue()) && (availableOkay == null || availableOkay.booleanValue())) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Mon Nov 10 18:14:00 2008
@@ -170,7 +170,7 @@
         String productId = (String) context.get("productId");
         Integer qty = (Integer) context.get("quantity");
         if (qty == null) {
-            qty = new Integer(1);
+            qty = Integer.valueOf(1);
         }
         
         Timestamp orderCreatedDate = (Timestamp) context.get("orderCreatedDate");
@@ -193,9 +193,9 @@
                 GenericValue productSubscriptionResource = (GenericValue) productSubscriptionResourceIter.next();
 
                 Long useTime = (Long) productSubscriptionResource.get("useTime");
-                Integer newUseTime = new Integer(0);
+                Integer newUseTime = Integer.valueOf(0);
                 if (useTime != null) {
-                    newUseTime = new Integer(useTime.intValue() * qty.intValue());
+                    newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
                 }
                 context.put("useTime", newUseTime);
                 context.put("useTimeUomId", productSubscriptionResource.get("useTimeUomId"));
@@ -261,7 +261,7 @@
                     context.put("orderId", orderId);
                     context.put("orderItemSeqId", orderItem.get("orderItemSeqId"));
                     context.put("inventoryItemId", orderItem.get("fromInventoryItemId"));
-                    context.put("quantity", new Integer(qty.intValue()));
+                    context.put("quantity", Integer.valueOf(qty.intValue()));
                     Map ctx = dctx.getModelService("processExtendSubscriptionByProduct").makeValid(context, ModelService.IN_PARAM);
                     Map thisResult = dispatcher.runSync("processExtendSubscriptionByProduct", ctx);
                     if (ServiceUtil.isError(thisResult)) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java Mon Nov 10 18:14:00 2008
@@ -78,7 +78,7 @@
         ppsmCtx.put("facilityId", "WebStoreWarehouse");
         ppsmCtx.put("locationSeqId","TLTLTLUL01" );
         ppsmCtx.put("targetLocationSeqId", "TLTLTLLL01");
-        ppsmCtx.put("quantityMoved", new Double(5));
+        ppsmCtx.put("quantityMoved", Double.valueOf(5));
         ppsmCtx.put("userLogin", userLogin);
         Map respMap3 = dispatcher.runSync("processPhysicalStockMove", ppsmCtx);
     }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java Mon Nov 10 18:14:00 2008
@@ -50,14 +50,14 @@
         session.setPickerPartyId(pickerPartyId);
 
         if (quantity == null) {
-            quantity = new Double(1);
+            quantity = Double.valueOf(1);
         }
 
         Debug.log("OrderId [" + orderId + "] ship group [" + shipGroupSeqId + "] Pack input [" + productId + "] @ [" + quantity + "] packageSeq [" + packageSeq + "] weight [" + weight +"]", module);
         
         if (weight == null) {
             Debug.logWarning("OrderId [" + orderId + "] ship group [" + shipGroupSeqId + "] product [" + productId + "] being packed without a weight, assuming 0", module); 
-            weight = new Double(0.0);
+            weight = Double.valueOf(0.0);
         }
 
         try {
@@ -176,7 +176,7 @@
         PackingSession session = (PackingSession) context.get("packingSession");
         int nextSeq = session.nextPackageSeq();
         Map result = ServiceUtil.returnSuccess();
-        result.put("nextPackageSeq", new Integer(nextSeq));
+        result.put("nextPackageSeq", Integer.valueOf(nextSeq));
         return result;
     }
 
@@ -184,7 +184,7 @@
         PackingSession session = (PackingSession) context.get("packingSession");
         int nextSeq = session.clearLastPackage();
         Map result = ServiceUtil.returnSuccess();
-        result.put("nextPackageSeq", new Integer(nextSeq));
+        result.put("nextPackageSeq", Integer.valueOf(nextSeq));
         return result;
     }
 
@@ -228,7 +228,7 @@
         String productStoreId = (String) context.get("productStoreId");
         
         double shippableWeight = setSessionPackageWeights(session, packageWeights);
-        Double estimatedShipCost = session.getShipmentCostEstimate(shippingContactMechId, shipmentMethodTypeId, carrierPartyId, carrierRoleTypeId, productStoreId, null, null, new Double(shippableWeight), null);
+        Double estimatedShipCost = session.getShipmentCostEstimate(shippingContactMechId, shipmentMethodTypeId, carrierPartyId, carrierRoleTypeId, productStoreId, null, null, Double.valueOf(shippableWeight), null);
         session.setAdditionalShippingCharge(estimatedShipCost);
         session.setWeightUomId(weightUomId);
 
@@ -286,7 +286,7 @@
                 String packageWeightStr = (String) packageWeights.get(packageSeqId);
                 if (UtilValidate.isNotEmpty(packageWeightStr)) {
                     double packageWeight = UtilMisc.toDouble(packageWeights.get(packageSeqId));
-                    session.setPackageWeight(Integer.parseInt(packageSeqId), new Double(packageWeight));
+                    session.setPackageWeight(Integer.parseInt(packageSeqId), Double.valueOf(packageWeight));
                     shippableWeight += packageWeight;
                 } else {
                     session.setPackageWeight(Integer.parseInt(packageSeqId), null);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Mon Nov 10 18:14:00 2008
@@ -163,7 +163,7 @@
                 switch (thisCheck) {
                     case 2:
                         Debug.log("Packing check returned '2' - new pack line will be created!", module);
-                        toCreateMap.put(res, new Double(thisQty));
+                        toCreateMap.put(res, Double.valueOf(thisQty));
                         qtyRemain -= thisQty;
                         break;
                     case 1:
@@ -234,7 +234,7 @@
         }
 
         // Add the line weight to the package weight
-        if (weight > 0) this.addToPackageWeight(packageSeqId, new Double(weight));
+        if (weight > 0) this.addToPackageWeight(packageSeqId, Double.valueOf(weight));
         
         // update the package sequence
         if (packageSeqId > packageSeq) {
@@ -426,7 +426,7 @@
                     "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId, "inventoryProductId", productId)));
             Double reservedDbl = res.getDouble("totQuantityAvailable");
             if (reservedDbl == null) {
-                reservedDbl = new Double(-1);
+                reservedDbl = Double.valueOf(-1);
             }
             reserved = reservedDbl.doubleValue();
         } catch (GenericEntityException e) {
@@ -443,7 +443,7 @@
             while (i.hasNext()) {
                 GenericValue v = (GenericValue) i.next();
                 Double qty = v.getDouble("quantity");
-                if (qty == null) qty = new Double(0);
+                if (qty == null) qty = Double.valueOf(0);
                 shipped += qty.doubleValue();
             }
         }
@@ -718,7 +718,7 @@
                 double totalPacked = this.getPackedQuantity(line.getOrderId(),  line.getOrderItemSeqId(),
                         line.getShipGroupSeqId(), line.getProductId(), line.getInventoryItemId(), -1);
 
-                line.issueItemToShipment(shipmentId, picklistBinId, userLogin, new Double(totalPacked), getDispatcher());
+                line.issueItemToShipment(shipmentId, picklistBinId, userLogin, Double.valueOf(totalPacked), getDispatcher());
                 processedLines.add(line);
             }
         }
@@ -766,7 +766,7 @@
     }
 
     protected void updateShipmentRouteSegments() throws GeneralException {
-        Double shipmentWeight = new Double(getTotalWeight());
+        Double shipmentWeight = Double.valueOf(getTotalWeight());
         if (shipmentWeight.doubleValue() <= 0) return;
         List shipmentRouteSegments = getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", this.getShipmentId()));
         if (! UtilValidate.isEmpty(shipmentRouteSegments)) {
@@ -869,17 +869,17 @@
             serviceContext.put("shippableItemInfo", shippableItemInfo);
 
             if (UtilValidate.isEmpty(shippableWeight)) {
-                shippableWeight = new Double(getTotalWeight());
+                shippableWeight = Double.valueOf(getTotalWeight());
             }
             serviceContext.put("shippableWeight", shippableWeight);
 
             if (UtilValidate.isEmpty(shippableQuantity)) {
-                shippableQuantity = new Double(getPackedQuantity(-1));
+                shippableQuantity = Double.valueOf(getPackedQuantity(-1));
             }
             serviceContext.put("shippableQuantity", shippableQuantity);
 
             if (UtilValidate.isEmpty(shippableTotal)) {
-                shippableTotal = new Double(0);
+                shippableTotal = Double.valueOf(0);
             }
             serviceContext.put("shippableTotal", shippableTotal);
     
@@ -912,7 +912,7 @@
             Iterator lit = this.getLines().iterator();
             while (lit.hasNext()) {
                 PackingSessionLine line = (PackingSessionLine) lit.next();
-                packageSeqIds.add(new Integer(line.getPackageSeq()));
+                packageSeqIds.add(Integer.valueOf(line.getPackageSeq()));
             }
         }
         return UtilMisc.makeListWritable(packageSeqIds);
@@ -920,16 +920,16 @@
     
     public void setPackageWeight(int packageSeqId, Double packageWeight) {
         if (UtilValidate.isEmpty(packageWeight)) {
-            packageWeights.remove(new Integer(packageSeqId));
+            packageWeights.remove(Integer.valueOf(packageSeqId));
         } else {
-            packageWeights.put(new Integer(packageSeqId), packageWeight);
+            packageWeights.put(Integer.valueOf(packageSeqId), packageWeight);
         }
     }
     
     public Double getPackageWeight(int packageSeqId) {
         if (this.packageWeights == null) return null;
         Double packageWeight = null;
-        Object p = packageWeights.get(new Integer(packageSeqId));
+        Object p = packageWeights.get(Integer.valueOf(packageSeqId));
         if (p != null) {
             packageWeight = (Double) p;
         }
@@ -939,7 +939,7 @@
     public void addToPackageWeight(int packageSeqId, Double weight) {
         if (UtilValidate.isEmpty(weight)) return;
         Double packageWeight = getPackageWeight(packageSeqId);
-        Double newPackageWeight = UtilValidate.isEmpty(packageWeight) ? weight : new Double(weight.doubleValue() + packageWeight.doubleValue());
+        Double newPackageWeight = UtilValidate.isEmpty(packageWeight) ? weight : Double.valueOf(weight.doubleValue() + packageWeight.doubleValue());
         setPackageWeight(packageSeqId, newPackageWeight);
     }
 

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java Mon Nov 10 18:14:00 2008
@@ -126,7 +126,7 @@
 
     protected void issueItemToShipment(String shipmentId, String picklistBinId, GenericValue userLogin, Double quantity, LocalDispatcher dispatcher) throws GeneralException {
         if (quantity == null) {
-            quantity = new Double(this.getQuantity());
+            quantity = Double.valueOf(this.getQuantity());
         }
 
         Map issueMap = FastMap.newInstance();
@@ -191,7 +191,7 @@
         Map packageMap = FastMap.newInstance();
         packageMap.put("shipmentId", shipmentId);
         packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId());
-        packageMap.put("quantity", new Double(this.getQuantity()));
+        packageMap.put("quantity", Double.valueOf(this.getQuantity()));
         packageMap.put("shipmentPackageSeqId", shipmentPackageSeqId);
         packageMap.put("userLogin", userLogin);
         Map packageResp = dispatcher.runSync("addShipmentContentToPackage", packageMap);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Mon Nov 10 18:14:00 2008
@@ -225,16 +225,16 @@
         Double initialEstimateAmt = (Double) context.get("initialEstimateAmt");
 
         if (shippableTotal == null) {
-            shippableTotal = new Double(0.00);
+            shippableTotal = Double.valueOf(0.00);
         }
         if (shippableQuantity == null) {
-            shippableQuantity = new Double(0.00);
+            shippableQuantity = Double.valueOf(0.00);
         }
         if (shippableWeight == null) {
-            shippableWeight = new Double(0.00);
+            shippableWeight = Double.valueOf(0.00);
         }
         if (initialEstimateAmt == null) {
-            initialEstimateAmt = new Double(0.00);
+            initialEstimateAmt = Double.valueOf(0.00);
         }
 
         // get the ShipmentCostEstimate(s)
@@ -255,7 +255,7 @@
             }
 
             Map respNow = ServiceUtil.returnSuccess();
-            respNow.put("shippingEstimateAmount", new Double(0.00));
+            respNow.put("shippingEstimateAmount", Double.valueOf(0.00));
             return respNow;
         }
 
@@ -404,9 +404,9 @@
                         String featureId = (String) fi.next();
                         Double featureQuantity = (Double) shippableFeatureMap.get(featureId);
                         if (featureQuantity == null) {
-                            featureQuantity = new Double(0.00);
+                            featureQuantity = Double.valueOf(0.00);
                         }
-                        featureQuantity = new Double(featureQuantity.doubleValue() + quantity.doubleValue());
+                        featureQuantity = Double.valueOf(featureQuantity.doubleValue() + quantity.doubleValue());
                         shippableFeatureMap.put(featureId, featureQuantity);
                     }
                 }
@@ -446,7 +446,7 @@
                     prioritySum += PRIORITY_PRICE;
 
                 // there will be only one of each priority; latest will replace
-                estimatePriority.put(new Integer(prioritySum), currentEstimate);
+                estimatePriority.put(Integer.valueOf(prioritySum), currentEstimate);
             }
 
             // locate the highest priority estimate; or the latest entered
@@ -504,10 +504,10 @@
         Double featurePercent = estimate.getDouble("featurePercent");
         Double featurePrice = estimate.getDouble("featurePrice");
         if (featurePercent == null) {
-            featurePercent = new Double(0);
+            featurePercent = Double.valueOf(0);
         }
         if (featurePrice == null) {
-            featurePrice = new Double(0.00);
+            featurePrice = Double.valueOf(0.00);
         }
 
         if (featureGroupId != null && featureGroupId.length() > 0 && shippableFeatureMap != null) {
@@ -563,7 +563,7 @@
 
         // prepare the return result
         Map responseResult = ServiceUtil.returnSuccess();
-        responseResult.put("shippingEstimateAmount", new Double(shippingTotal));
+        responseResult.put("shippingEstimateAmount", Double.valueOf(shippingTotal));
         return responseResult;
     }
 
@@ -641,7 +641,7 @@
             stageShip.set("postalCodeExt", address.get("postalCodeExt"));
             stageShip.set("countryGeoId", address.get("countryGeoId"));
             stageShip.set("stateProvinceGeoId", address.get("stateProvinceGeoId"));
-            stageShip.set("numberOfPackages", new Long(packages.size()));
+            stageShip.set("numberOfPackages", Long.valueOf(packages.size()));
             stageShip.set("handlingInstructions", shipment.get("handlingInstructions"));
             toStore.add(stageShip);
 
@@ -883,7 +883,7 @@
                 GenericValue item = (GenericValue) iter.next();
                 double shippedQuantity = item.getDouble("quantity").doubleValue();
                 Double quantity = (Double) shippedCountMap.get(item.getString("productId"));
-                quantity = new Double(quantity == null ? shippedQuantity : shippedQuantity + quantity.doubleValue());
+                quantity = Double.valueOf(quantity == null ? shippedQuantity : shippedQuantity + quantity.doubleValue());
                 shippedCountMap.put(item.getString("productId"), quantity);
             }
 
@@ -894,7 +894,7 @@
                 GenericValue item = (GenericValue) iter.next();
                 double receivedQuantity = item.getDouble("quantityAccepted").doubleValue();
                 Double quantity = (Double) receivedCountMap.get(item.getString("productId"));
-                quantity = new Double(quantity == null ? receivedQuantity : receivedQuantity + quantity.doubleValue());
+                quantity = Double.valueOf(quantity == null ? receivedQuantity : receivedQuantity + quantity.doubleValue());
                 receivedCountMap.put(item.getString("productId"), quantity);
             }
 
@@ -1055,7 +1055,7 @@
             
                 // Convert the value to the shipment currency, if necessary
                 GenericValue orderHeader = packageContent.getRelatedOne("OrderHeader");
-                Map convertUomResult = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", orderHeader.getString("currencyUom"), "uomIdTo", currencyUomId, "originalValue", new Double(packageContentValue.doubleValue())));
+                Map convertUomResult = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", orderHeader.getString("currencyUom"), "uomIdTo", currencyUomId, "originalValue", Double.valueOf(packageContentValue.doubleValue())));
                 if (ServiceUtil.isError(convertUomResult)) return convertUomResult;
                 if (convertUomResult.containsKey("convertedValue")) {
                     packageContentValue = new BigDecimal(((Double) convertUomResult.get("convertedValue")).doubleValue()).setScale(decimals, rounding);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Mon Nov 10 18:14:00 2008
@@ -207,7 +207,7 @@
             String tmpValue = UtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.default.weight.value");
             if (tmpValue != null) {
                 try {
-                    shippableWeight = new Double(tmpValue);
+                    shippableWeight = Double.valueOf(tmpValue);
                 } catch (Exception e) {
                     return ServiceUtil.returnError("Cannot get DHL Estimate: Default shippable weight not configured (shipment.default.weight.value)");
                 }
@@ -217,12 +217,12 @@
         // TODO: if a weight UOM is passed in, use convertUom service to convert it here
         if (shippableWeight.doubleValue() < 1.0) {
             Debug.logWarning("DHL Estimate: Weight is less than 1 lb, submitting DHL minimum of 1 lb for estimate.", module);
-            shippableWeight = new Double(1.0);
+            shippableWeight = Double.valueOf(1.0);
         }
         if ((dhlShipmentDetailCode.equals("G") && shippableWeight.doubleValue() > 999) || (shippableWeight.doubleValue() > 150)) {
             return ServiceUtil.returnError("Cannot get DHL Estimate: Shippable weight cannot be greater than 999 lbs for ground or 150 lbs for all other services.");
         }
-        String weight = (new Integer((int) shippableWeight.longValue())).toString();
+        String weight = (Integer.valueOf((int) shippableWeight.longValue())).toString();
 
         // create AccessRequest XML doc using FreeMarker template
         String templateName = UtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.template.dhl.rate.estimate");
@@ -363,7 +363,7 @@
                 chargeList.add(charge);
             }
         }
-        Double shippingEstimateAmount = new Double(responseTotalChargeEstimate);
+        Double shippingEstimateAmount = Double.valueOf(responseTotalChargeEstimate);
         dhlRateCodeMap.put("dateGenerated", dateGenerated);
         dhlRateCodeMap.put("serviceLevelCommitment",
                 responseServiceLevelCommitmentDescription);
@@ -642,7 +642,7 @@
                         packageWeight = Double.valueOf(UtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.default.weight.value"));
                     } catch (NumberFormatException ne) {
                         Debug.logWarning("Default shippable weight not configured (shipment.default.weight.value)", module);
-                        packageWeight = new Double(1.0);
+                        packageWeight = Double.valueOf(1.0);
                     }
                 }
                 // convert weight
@@ -654,7 +654,7 @@
                 results = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", DHL_WEIGHT_UOM_ID, "originalValue", packageWeight));
                 if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR)) || (results.get("convertedValue") == null)) {
                     Debug.logWarning("Unable to convert weights for shipmentId " + shipmentId , module);
-                    packageWeight = new Double(1.0);
+                    packageWeight = Double.valueOf(1.0);
                 } else {
                     packageWeight = (Double) results.get("convertedValue");
                 }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Mon Nov 10 18:14:00 2008
@@ -783,7 +783,7 @@
                             packageWeight = Double.valueOf(UtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.default.weight.value"));
                         } catch (NumberFormatException ne) {
                             Debug.logWarning("Default shippable weight not configured (shipment.default.weight.value), assuming 1.0" + weightUomId , module);
-                            packageWeight = new Double(1.0);
+                            packageWeight = Double.valueOf(1.0);
                         }
                     }
                     

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Mon Nov 10 18:14:00 2008
@@ -497,7 +497,7 @@
                     BigDecimal packageValue = (BigDecimal) getPackageValueResult.get("packageValue");
                     
                     // Convert the value of the COD surcharge to the shipment currency, if necessary
-                    Map convertUomResult = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", codSurchargeCurrencyUomId, "uomIdTo", currencyCode, "originalValue", new Double(codSurchargePackageAmount.doubleValue())));
+                    Map convertUomResult = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", codSurchargeCurrencyUomId, "uomIdTo", currencyCode, "originalValue", Double.valueOf(codSurchargePackageAmount.doubleValue())));
                     if (ServiceUtil.isError(convertUomResult)) return convertUomResult;
                     if (convertUomResult.containsKey("convertedValue")) {
                         codSurchargePackageAmount = new BigDecimal(((Double) convertUomResult.get("convertedValue")).doubleValue()).setScale(decimals, rounding);
@@ -1652,11 +1652,11 @@
                     for (long x = 0; x < pieces; x++) {
                         if(itemInfo.get("inShippingBox") != null &&  ((String) itemInfo.get("inShippingBox")).equalsIgnoreCase("Y")) {
                             Map newPackage = FastMap.newInstance();
-                            newPackage.put(productId, new Double(partialQty));
+                            newPackage.put(productId, Double.valueOf(partialQty));
                             packages.add(newPackage);
                         } else if (weight >= maxWeight) {
                             Map newPackage = FastMap.newInstance();
-                            newPackage.put(productId, new Double(partialQty));
+                            newPackage.put(productId, Double.valueOf(partialQty));
                             packages.add(newPackage);
                         } else if (totalWeight > 0) {
                             // create the first package
@@ -1674,14 +1674,14 @@
                                     if (packageWeight <= maxWeight) {
                                         Double qtyD = (Double) packageMap.get(productId);
                                         double qty = qtyD == null ? 0 : qtyD.doubleValue();
-                                        packageMap.put(productId, new Double(qty + partialQty));
+                                        packageMap.put(productId, Double.valueOf(qty + partialQty));
                                         addedToPackage = true;
                                     }
                                 }
                             }
                             if (!addedToPackage) {
                                 Map packageMap = FastMap.newInstance();
-                                packageMap.put(productId, new Double(partialQty));
+                                packageMap.put(productId, Double.valueOf(partialQty));
                                 packages.add(packageMap);
                             }
                         }
@@ -1753,7 +1753,7 @@
                     Element totalCharges = UtilXml.firstChildElement(element, "TotalCharges");
                     String totalString = UtilXml.childElementValue(totalCharges, "MonetaryValue");
 
-                    rateMap.put(serviceCode, new Double(totalString));
+                    rateMap.put(serviceCode, Double.valueOf(totalString));
                     if (firstRate == null) {
                         firstRate = (Double) rateMap.get(serviceCode);
                     }
@@ -1930,13 +1930,13 @@
         }
 
         if (shippableTotal == null) {
-            shippableTotal = new Double(0.00);
+            shippableTotal = Double.valueOf(0.00);
         }
         if (shippableQuantity == null) {
-            shippableQuantity = new Double(0.00);
+            shippableQuantity = Double.valueOf(0.00);
         }
         if (shippableWeight == null) {
-            shippableWeight = new Double(0.00);
+            shippableWeight = Double.valueOf(0.00);
         }
         if (serviceConfigProps == null) {
             serviceConfigProps = "shipment.properties";

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=712913&r1=712912&r2=712913&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Mon Nov 10 18:14:00 2008
@@ -213,7 +213,7 @@
         }
 
         Map result = ServiceUtil.returnSuccess();
-        result.put("shippingEstimateAmount", new Double(estimateAmount));
+        result.put("shippingEstimateAmount", Double.valueOf(estimateAmount));
         return result;
     }
 
@@ -241,7 +241,7 @@
                     for (long x = 0; x < pieces; x++) {
                         if (weight >= maxWeight) {
                             Map newPackage = FastMap.newInstance();
-                            newPackage.put(productId, new Double(partialQty));
+                            newPackage.put(productId, Double.valueOf(partialQty));
                             packages.add(newPackage);
                         } else if (totalWeight > 0) {
                             // create the first package
@@ -259,14 +259,14 @@
                                     if (packageWeight <= maxWeight) {
                                         Double qtyD = (Double) packageMap.get(productId);
                                         double qty = qtyD == null ? 0 : qtyD.doubleValue();
-                                        packageMap.put(productId, new Double(qty + partialQty));
+                                        packageMap.put(productId, Double.valueOf(qty + partialQty));
                                         addedToPackage = true;
                                     }
                                 }
                             }
                             if (!addedToPackage) {
                                 Map packageMap = FastMap.newInstance();
-                                packageMap.put(productId, new Double(partialQty));
+                                packageMap.put(productId, Double.valueOf(partialQty));
                                 packages.add(packageMap);
                             }
                         }
@@ -307,7 +307,7 @@
                 // attempt a conversion to pounds
                 Map result = FastMap.newInstance();
                 try {
-                    result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", new Double(productWeight)));
+                    result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", Double.valueOf(productWeight)));
                 } catch (GenericServiceException ex) {
                     Debug.logError(ex, module);
                 }
@@ -917,7 +917,7 @@
                     // attempt a conversion to pounds
                     Map result = FastMap.newInstance();
                     try {
-                        result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", new Double(weight)));
+                        result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", Double.valueOf(weight)));
                     } catch (GenericServiceException ex) {
                         return ServiceUtil.returnError(ex.getMessage());
                     }