svn commit: r1837578 - in /ofbiz/ofbiz-plugins/trunk: assetmaint/src/main/java/org/apache/ofbiz/assetmaint/ ebay/src/main/java/org/apache/ofbiz/ebay/ ebaystore/src/main/java/org/apache/ofbiz/ebaystore/ lucene/src/main/java/org/apache/ofbiz/content/sear...

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

svn commit: r1837578 - in /ofbiz/ofbiz-plugins/trunk: assetmaint/src/main/java/org/apache/ofbiz/assetmaint/ ebay/src/main/java/org/apache/ofbiz/ebay/ ebaystore/src/main/java/org/apache/ofbiz/ebaystore/ lucene/src/main/java/org/apache/ofbiz/content/sear...

pgil
Author: pgil
Date: Tue Aug  7 07:36:13 2018
New Revision: 1837578

URL: http://svn.apache.org/viewvc?rev=1837578&view=rev
Log:
Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

Modified:
    ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
    ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
    ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
    ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/GitHubEvents.java
    ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/LinkedInEvents.java
    ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
    ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
    ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java
    ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
    ofbiz/ofbiz-plugins/trunk/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java
    ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
    ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java
    ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java

Modified: ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java Tue Aug  7 07:36:13 2018
@@ -55,7 +55,7 @@ public class FixedAssetMaintServices {
         String productId = (String)context.get("productId");
         String facilityId = (String)context.get("facilityId");
         Double quantity = (Double)context.get("quantity");
-        double requestedQty = quantity.doubleValue();
+        double requestedQty = quantity;
 
         try {
             GenericValue product = ProductWorker.findProduct(delegator, productId);
@@ -87,13 +87,13 @@ public class FixedAssetMaintServices {
             while (requestedQty > 0 && itr.hasNext()) {
                 GenericValue inventoryItem = itr.next();
                 String inventoryItemId = inventoryItem.getString("inventoryItemId");
-                atp = inventoryItem.getDouble("availableToPromiseTotal").doubleValue();
+                atp = inventoryItem.getDouble("availableToPromiseTotal");
                 findCurrInventoryParams = UtilMisc.toMap("inventoryItemId", inventoryItemId);
                 Double issueQuantity = null;
                 if (requestedQty > atp) {
-                    issueQuantity = new Double(atp);
+                    issueQuantity = atp;
                 } else {
-                    issueQuantity = new Double(requestedQty);
+                    issueQuantity = requestedQty;
                 }
                 Map<String, Object> itemIssuanceCtx = new HashMap<String, Object>();
                 itemIssuanceCtx.put("userLogin", userLogin);
@@ -106,7 +106,7 @@ public class FixedAssetMaintServices {
                 if (ServiceUtil.isError(result)) {
                     return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AssetMaintProblemCallingService", locale), null, null, result);
                 }
-                requestedQty = requestedQty - issueQuantity.doubleValue();
+                requestedQty = requestedQty - issueQuantity;
             }
         } catch (GenericEntityException e) {
             Debug.logError("Problem in retriving data from database", module);

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java Tue Aug  7 07:36:13 2018
@@ -287,7 +287,7 @@ public class EbayHelper {
                     "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId, "amount",
                     new BigDecimal(amount));
             if (sourcePercentage != 0) {
-                inputMap.put("sourcePercentage", new Double(sourcePercentage));
+                inputMap.put("sourcePercentage", sourcePercentage);
             }
             orderAdjustment = delegator.makeValue("OrderAdjustment", inputMap);
         } catch (Exception e) {

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java Tue Aug  7 07:36:13 2018
@@ -743,13 +743,13 @@ public class EbayOrderServices {
                                 double shippingSurcharge = 0;
 
                                 if (UtilValidate.isNotEmpty(incuranceCost)) {
-                                    shippingInsuranceCost = new Double(incuranceCost).doubleValue();
+                                    shippingInsuranceCost = new Double(incuranceCost);
                                 }
                                 if (UtilValidate.isNotEmpty(additionalCost)) {
-                                    shippingServiceAdditionalCost = new Double(additionalCost).doubleValue();
+                                    shippingServiceAdditionalCost = new Double(additionalCost);
                                 }
                                 if (UtilValidate.isNotEmpty(surchargeCost)) {
-                                    shippingSurcharge = new Double(surchargeCost).doubleValue();
+                                    shippingSurcharge = new Double(surchargeCost);
                                 }
                                 double shippingTotalAdditionalCost = shippingInsuranceCost + shippingServiceAdditionalCost + shippingSurcharge;
                                 String totalAdditionalCost = new Double(shippingTotalAdditionalCost).toString();
@@ -1063,7 +1063,7 @@ public class EbayOrderServices {
 
             String shippingCost = (String) shippingServiceSelectedCtx.get("shippingServiceCost");
             if (UtilValidate.isNotEmpty(shippingCost)) {
-                double shippingAmount = new Double(shippingCost).doubleValue();
+                double shippingAmount = new Double(shippingCost);
                 if (shippingAmount > 0) {
                     GenericValue shippingAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SHIPPING_CHARGES", cart.getOrderId(), null, null, shippingAmount, 0.0);
                     if (shippingAdjustment != null) {
@@ -1074,7 +1074,7 @@ public class EbayOrderServices {
             // Apply additional shipping costs as order adjustment
             String shippingTotalAdditionalCost = (String) shippingServiceSelectedCtx.get("shippingTotalAdditionalCost");
             if (UtilValidate.isNotEmpty(shippingTotalAdditionalCost)) {
-                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost).doubleValue();
+                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost);
                 if (shippingAdditionalCost > 0) {
                     GenericValue shippingAdjustment = EbayHelper.makeOrderAdjustment(delegator, "MISCELLANEOUS_CHARGE", cart.getOrderId(), null, null, shippingAdditionalCost, 0.0);
                     if (shippingAdjustment != null) {
@@ -1087,11 +1087,11 @@ public class EbayOrderServices {
             String salesTaxAmount = (String) shippingDetailsCtx.get("salesTaxAmount");
             String salesTaxPercent = (String) shippingDetailsCtx.get("salesTaxPercent");
             if (UtilValidate.isNotEmpty(salesTaxAmount)) {
-                double salesTaxAmountTotal = new Double(salesTaxAmount).doubleValue();
+                double salesTaxAmountTotal = new Double(salesTaxAmount);
                 if (salesTaxAmountTotal > 0) {
                     double salesPercent = 0.0;
                     if (UtilValidate.isNotEmpty(salesTaxPercent)) {
-                        salesPercent = new Double(salesTaxPercent).doubleValue();
+                        salesPercent = new Double(salesTaxPercent);
                     }
                     GenericValue salesTaxAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SALES_TAX", cart.getOrderId(), null, null, salesTaxAmountTotal, salesPercent);
                     if (salesTaxAdjustment != null) {

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java Tue Aug  7 07:36:13 2018
@@ -545,15 +545,15 @@ public class ImportOrdersFromEbay {
                                 double shippingSurcharge = 0;
 
                                 if (UtilValidate.isNotEmpty(incuranceCost)) {
-                                    shippingInsuranceCost = new Double(incuranceCost).doubleValue();
+                                    shippingInsuranceCost = new Double(incuranceCost);
                                 }
 
                                 if (UtilValidate.isNotEmpty(additionalCost)) {
-                                    shippingServiceAdditionalCost = new Double(additionalCost).doubleValue();
+                                    shippingServiceAdditionalCost = new Double(additionalCost);
                                 }
 
                                 if (UtilValidate.isNotEmpty(surchargeCost)) {
-                                    shippingSurcharge = new Double(surchargeCost).doubleValue();
+                                    shippingSurcharge = new Double(surchargeCost);
                                 }
 
                                 double shippingTotalAdditionalCost = shippingInsuranceCost + shippingServiceAdditionalCost + shippingSurcharge;
@@ -681,7 +681,7 @@ public class ImportOrdersFromEbay {
             // Apply shipping costs as order adjustment
             String shippingCost = (String) parameters.get("shippingServiceCost");
             if (UtilValidate.isNotEmpty(shippingCost)) {
-                double shippingAmount = new Double(shippingCost).doubleValue();
+                double shippingAmount = new Double(shippingCost);
                 if (shippingAmount > 0) {
                     GenericValue shippingAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SHIPPING_CHARGES", cart.getOrderId(), null, null, shippingAmount, 0.0);
                     if (shippingAdjustment != null) {
@@ -693,7 +693,7 @@ public class ImportOrdersFromEbay {
             // Apply additional shipping costs as order adjustment
             String shippingTotalAdditionalCost = (String) parameters.get("shippingTotalAdditionalCost");
             if (UtilValidate.isNotEmpty(shippingTotalAdditionalCost)) {
-                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost).doubleValue();
+                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost);
                 if (shippingAdditionalCost > 0) {
                     GenericValue shippingAdjustment = EbayHelper.makeOrderAdjustment(delegator, "MISCELLANEOUS_CHARGE", cart.getOrderId(), null, null, shippingAdditionalCost, 0.0);
                     if (shippingAdjustment != null) {
@@ -706,11 +706,11 @@ public class ImportOrdersFromEbay {
             String salesTaxAmount = (String) parameters.get("salesTaxAmount");
             String salesTaxPercent = (String) parameters.get("salesTaxPercent");
             if (UtilValidate.isNotEmpty(salesTaxAmount)) {
-                double salesTaxAmountTotal = new Double(salesTaxAmount).doubleValue();
+                double salesTaxAmountTotal = new Double(salesTaxAmount);
                 if (salesTaxAmountTotal > 0) {
                     double salesPercent = 0.0;
                     if (UtilValidate.isNotEmpty(salesTaxPercent)) {
-                        salesPercent = new Double(salesTaxPercent).doubleValue();
+                        salesPercent = new Double(salesTaxPercent);
                     }
                     GenericValue salesTaxAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SALES_TAX", cart.getOrderId(), null, null, salesTaxAmountTotal, salesPercent);
                     if (salesTaxAdjustment != null) {

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java Tue Aug  7 07:36:13 2018
@@ -525,7 +525,7 @@ public class ProductsExportToEbay {
                     categoryParent = params[1];
                     levelLimit = params[2];
                     Integer level = Integer.valueOf(levelLimit);
-                    levelLimit = (level.intValue() + 1) + "";
+                    levelLimit = (level + 1) + "";
                 }
             }
 

Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java Tue Aug  7 07:36:13 2018
@@ -187,7 +187,7 @@ public class EbayStoreOrder {
 
             String shippingTotalAdditionalCost = context.get("shippingTotalAdditionalCost").toString();
             if (UtilValidate.isNotEmpty(shippingTotalAdditionalCost)) {
-                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost).doubleValue();
+                double shippingAdditionalCost = new Double(shippingTotalAdditionalCost);
                 if (shippingAdditionalCost > 0) {
                     GenericValue shippingAdjustment = EbayHelper.makeOrderAdjustment(delegator, "MISCELLANEOUS_CHARGE", cart.getOrderId(), null, null, shippingAdditionalCost, 0.0);
                     if (shippingAdjustment != null) {
@@ -199,11 +199,11 @@ public class EbayStoreOrder {
             String salesTaxAmount = context.get("salesTaxAmount").toString();
             String salesTaxPercent = context.get("salesTaxPercent").toString();
             if (UtilValidate.isNotEmpty(salesTaxAmount)) {
-                double salesTaxAmountTotal = new Double(salesTaxAmount).doubleValue();
+                double salesTaxAmountTotal = new Double(salesTaxAmount);
                 if (salesTaxAmountTotal > 0) {
                     double salesPercent = 0.0;
                     if (UtilValidate.isNotEmpty(salesTaxPercent)) {
-                        salesPercent = new Double(salesTaxPercent).doubleValue();
+                        salesPercent = new Double(salesTaxPercent);
                     }
                     GenericValue salesTaxAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SALES_TAX", cart.getOrderId(), null, null, salesTaxAmountTotal, salesPercent);
                     if (salesTaxAdjustment != null) {
@@ -404,7 +404,7 @@ public class EbayStoreOrder {
                 if (salesTaxAmount.doubleValue() > 0) {
                     double salesPercent = 0.0;
                     if (UtilValidate.isNotEmpty(shippingDetailsCtx.get("salesTaxPercent"))) {
-                        salesPercent = new Double(shippingDetailsCtx.get("salesTaxPercent").toString()).doubleValue();
+                        salesPercent = new Double(shippingDetailsCtx.get("salesTaxPercent").toString());
                     }
                     GenericValue salesTaxAdjustment = EbayHelper.makeOrderAdjustment(delegator, "SALES_TAX", cart.getOrderId(), null, null, salesTaxAmount.doubleValue(), salesPercent);
                     if (salesTaxAdjustment != null) {

Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java (original)
+++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java Tue Aug  7 07:36:13 2018
@@ -183,7 +183,7 @@ public class ProductDocument implements
                     int weight = 1;
                     try {
                         // this is defaulting to a weight of 1 because you specified you wanted to index this type
-                        weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1).intValue();
+                        weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1);
                     } catch (Exception e) {
                         Debug.logWarning("Could not parse weight number: " + e.toString(), module);
                     }

Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/GitHubEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/GitHubEvents.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/GitHubEvents.java (original)
+++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/GitHubEvents.java Tue Aug  7 07:36:13 2018
@@ -285,7 +285,7 @@ public class GitHubEvents {
                 String userLoginId = authn.createUser(userInfo);
                 userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", userLoginId).queryOne();
             }
-            String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
+            String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5));
             boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security", "password.encrypt"));
             userLogin.set("currentPassword", useEncryption ? HashCrypt.digestHash(LoginServices.getHashType(), null, autoPassword) : autoPassword);
             userLogin.store();

Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/LinkedInEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/LinkedInEvents.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/LinkedInEvents.java (original)
+++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/event/LinkedInEvents.java Tue Aug  7 07:36:13 2018
@@ -292,7 +292,7 @@ public class LinkedInEvents {
                 String userLoginId = authn.createUser(userInfo);
                 userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", userLoginId).queryOne();
             }
-            String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
+            String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5));
             boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security", "password.encrypt"));
             userLogin.set("currentPassword", useEncryption ? HashCrypt.digestHash(LoginServices.getHashType(), null, autoPassword) : autoPassword);
             userLogin.store();

Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java (original)
+++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java Tue Aug  7 07:36:13 2018
@@ -939,7 +939,7 @@ public class HtmlReport extends Abstract
      * @return the button row
      */
     public String dialogButtonsOkCancel(HttpServletRequest request, String okAttrs, String cancelAttrs) {
-        if (Boolean.valueOf(getParamThreadHasNext(request)).booleanValue()
+        if (Boolean.valueOf(getParamThreadHasNext(request))
             && ReportStringUtil.isNotEmpty(getParamReportContinueKey())) {
             return dialogButtons(new int[] {BUTTON_OK, BUTTON_CANCEL}, new String[] {
                 okAttrs,
@@ -964,7 +964,7 @@ public class HtmlReport extends Abstract
         } else {
             downloadAttrs += " ";
         }
-        if (Boolean.valueOf(getParamThreadHasNext(request)).booleanValue()
+        if (Boolean.valueOf(getParamThreadHasNext(request))
             && ReportStringUtil.isNotEmpty(getParamReportContinueKey())) {
             return dialogButtons(new int[] {BUTTON_OK, BUTTON_CANCEL, BUTTON_DOWNLOAD}, new String[] {
                 okAttrs,

Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java (original)
+++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java Tue Aug  7 07:36:13 2018
@@ -228,7 +228,7 @@ public final class ReportEncoder {
         while (matcher.find()) {
             String entity = matcher.group();
             String value = entity.substring(2, entity.length() - 1);
-            int c = Integer.valueOf(value).intValue();
+            int c = Integer.valueOf(value);
             if (c < 128) {
                 // first 128 chars are contained in almost every charset
                 entity = new String(new char[] {(char)c});

Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java (original)
+++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java Tue Aug  7 07:36:13 2018
@@ -235,16 +235,16 @@ public abstract class AbstractPricatPars
             for (CellReference cell : errorMessages.keySet()) {
                 if (cell != null && errorMessages.get(cell) != null) {
                     XSSFRow row = sheet.getRow(cell.getRow());
-                    Integer rowNum = Integer.valueOf(row.getRowNum());
+                    Integer rowNum = row.getRowNum();
                     int errorRow = newRowNum;
                     if (rowMapping.containsKey(rowNum)) {
-                        errorRow = rowMapping.get(rowNum).intValue();
+                        errorRow = rowMapping.get(rowNum);
                     } else {
                         XSSFRow newRow = errorSheet.getRow(errorRow);
                         if (newRow == null) {
                             newRow = errorSheet.createRow(errorRow);
                         }
-                        rowMapping.put(rowNum, Integer.valueOf(errorRow));
+                        rowMapping.put(rowNum, errorRow);
                         newRow.setHeight(row.getHeight());
                         copyRow(row, newRow, factory, errorPatriarch);
                         newRowNum ++;
@@ -418,7 +418,7 @@ public abstract class AbstractPricatPars
                 cell = row.getCell(i);
             }
             if (cell == null) {
-                if (((Boolean) colNames.get(i)[2]).booleanValue()) {
+                if ((Boolean) colNames.get(i)[2]) {
                     report.print(UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale), InterfaceReport.FORMAT_WARNING);
                     errorMessages.put(new CellReference(cell), UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale));
                     foundError = true;
@@ -439,14 +439,14 @@ public abstract class AbstractPricatPars
             } else {
                 report.print(((i == 0)?"":","), InterfaceReport.FORMAT_NOTE);
             }
-            if (((Boolean) colNames.get(i)[2]).booleanValue() && UtilValidate.isEmpty(cellValue)) {
+            if ((Boolean) colNames.get(i)[2] && UtilValidate.isEmpty(cellValue)) {
                 report.print(UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale), InterfaceReport.FORMAT_WARNING);
                 errorMessages.put(new CellReference(cell), UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale));
                 foundError = true;
                 results.add(null);
                 continue;
             }
-            if (((Boolean) colNames.get(i)[2]).booleanValue() && cellType != (int) colNames.get(i)[1]) {
+            if ((Boolean) colNames.get(i)[2] && cellType != (int) colNames.get(i)[1]) {
                 // String warningMessage = "";
                 if ((int) colNames.get(i)[1] == XSSFCell.CELL_TYPE_STRING) {
                     results.add(cellValue);
@@ -562,7 +562,7 @@ public abstract class AbstractPricatPars
             }
             Timestamp now = UtilDateTime.nowTimestamp();
             if (UtilValidate.isEmpty(historyValue)) {
-                historyValue = delegator.makeValue("ExcelImportHistory", UtilMisc.toMap("sequenceNum", Long.valueOf(sequenceNum), "userLoginId", userLoginId,
+                historyValue = delegator.makeValue("ExcelImportHistory", UtilMisc.toMap("sequenceNum", sequenceNum, "userLoginId", userLoginId,
                                                     "fileName", pricatFile.getName(), "statusId", "EXCEL_IMPORTED", "fromDate", now,  
                                                     "thruDate", now, "threadName", threadName, "logFileName", logFileName));
             } else {

Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java (original)
+++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java Tue Aug  7 07:36:13 2018
@@ -558,7 +558,7 @@ public class SamplePricatParser extends
                 cell = row.getCell(i);
             }
             if (cell == null) {
-                if (((Boolean) colNames.get(i)[2]).booleanValue() && (facilities.keySet().size() > 1 || (facilities.keySet().size() == 1 && i >= 2))) {
+                if ((Boolean) colNames.get(i)[2] && (facilities.keySet().size() > 1 || (facilities.keySet().size() == 1 && i >= 2))) {
                     report.print(UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale), InterfaceReport.FORMAT_WARNING);
                     cell = row.createCell(i);
                     errorMessages.put(new CellReference(cell), UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale));
@@ -589,14 +589,14 @@ public class SamplePricatParser extends
             } else {
                 report.print(((i == 0)?"":","), InterfaceReport.FORMAT_NOTE);
             }
-            if (((Boolean) colNames.get(i)[2]).booleanValue() && UtilValidate.isEmpty(cellValue) && (facilities.keySet().size() > 1 || (facilities.keySet().size() == 1 && i >= 2))) {
+            if ((Boolean) colNames.get(i)[2] && UtilValidate.isEmpty(cellValue) && (facilities.keySet().size() > 1 || (facilities.keySet().size() == 1 && i >= 2))) {
                 report.print(UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale), InterfaceReport.FORMAT_WARNING);
                 errorMessages.put(new CellReference(cell), UtilProperties.getMessage(resource, "ErrorColCannotEmpty", new Object[] {colNames.get(i)[0]}, locale));
                 foundError = true;
                 results.add(null);
                 continue;
             }
-            if (((Boolean) colNames.get(i)[2]).booleanValue() && cellType != (int) colNames.get(i)[1]) {
+            if ((Boolean) colNames.get(i)[2] && cellType != (int) colNames.get(i)[1]) {
                 // String warningMessage = "";
                 if ((int) colNames.get(i)[1] == XSSFCell.CELL_TYPE_STRING) {
                     if (UtilValidate.isNotEmpty(cellValue) && UtilValidate.isNotEmpty(cellValue.trim())) {

Modified: ofbiz/ofbiz-plugins/trunk/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java (original)
+++ ofbiz/ofbiz-plugins/trunk/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java Tue Aug  7 07:36:13 2018
@@ -65,7 +65,7 @@ public class Various {
                     standard.put("estimatedNumPeople", new Double("1"));
                 }
                 if (standard.get("estimatedDuration") != null) {
-                    plannedHours += standard.getDouble("estimatedDuration").doubleValue() / standard.getDouble("estimatedNumPeople").doubleValue();
+                    plannedHours += standard.getDouble("estimatedDuration") / standard.getDouble("estimatedNumPeople");
                 }
             }
 
@@ -96,7 +96,7 @@ public class Various {
                 if (actuals.size() > 0) {
                     for (GenericValue actual : actuals) {
                         Double hour = (Double) actual.get("hours");
-                        double hours = hour.doubleValue();
+                        double hours = hour;
                         actualHours = actualHours + hours;
                     }
                 }

Modified: ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java (original)
+++ ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java Tue Aug  7 07:36:13 2018
@@ -484,8 +484,8 @@ public abstract class SolrProductSearch
             Map<String, Integer> facetQuery = queryResult.getFacetQuery();
             Map<String, String> facetQueries = new HashMap<String, String>();
             for (String fq : facetQuery.keySet()) {
-                if (facetQuery.get(fq).intValue() > 0)
-                    facetQueries.put(fq, fq.replaceAll("^.*\\u005B(.*)\\u005D", "$1") + " (" + facetQuery.get(fq).intValue() + ")");
+                if (facetQuery.get(fq) > 0)
+                    facetQueries.put(fq, fq.replaceAll("^.*\\u005B(.*)\\u005D", "$1") + " (" + facetQuery.get(fq) + ")");
             }
 
             Map<String, Map<String, Long>> facetFields = new HashMap<String, Map<String, Long>>();

Modified: ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java (original)
+++ ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java Tue Aug  7 07:36:13 2018
@@ -235,7 +235,7 @@ public class WebPosSession {
         if (UtilValidate.isEmpty(mgrLoggedIn)) {
             mgrLoggedIn = hasRole(getUserLogin(), "MANAGER");
         }
-        return mgrLoggedIn.booleanValue();
+        return mgrLoggedIn;
     }
 
     public WebPosTransaction getCurrentTransaction() {

Modified: ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java?rev=1837578&r1=1837577&r2=1837578&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java (original)
+++ ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java Tue Aug  7 07:36:13 2018
@@ -147,7 +147,7 @@ public class WebPosTransaction {
     public void closeTx() {
         if (UtilValidate.isNotEmpty(txLog)) {
             txLog.set("statusId", "POSTX_CLOSED");
-            txLog.set("itemCount", new Long(getCart().size()));
+            txLog.set("itemCount", (long) getCart().size());
             txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
             try {
                 txLog.store();
@@ -245,7 +245,7 @@ public class WebPosTransaction {
         // save the TX Log
         txLog.set("statusId", "POSTX_SOLD");
         txLog.set("orderId", orderId);
-        txLog.set("itemCount", new Long(getCart().size()));
+        txLog.set("itemCount", (long) getCart().size());
         txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
         try {
             txLog.store();