svn commit: r1857906 [5/9] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/agreement/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/test/ applications/accounting/src/main/java/org...

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

svn commit: r1857906 [5/9] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/agreement/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/test/ applications/accounting/src/main/java/org...

mthl
Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryWorker.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryWorker.java Sun Apr 21 12:49:52 2019
@@ -84,7 +84,7 @@ public final class CategoryWorker {
 
     public static void getCategoriesWithNoParent(ServletRequest request, String attributeName) {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
-        Collection<GenericValue> results = new LinkedList<GenericValue>();
+        Collection<GenericValue> results = new LinkedList<>();
 
         try {
             Collection<GenericValue> allCategories = EntityQuery.use(delegator).from("ProductCategory").queryList();
@@ -138,7 +138,7 @@ public final class CategoryWorker {
     }
 
     public static List<GenericValue> getRelatedCategoriesRet(Delegator delegator, String attributeName, String parentId, boolean limitView, boolean excludeEmpty, boolean recursive) {
-        List<GenericValue> categories = new LinkedList<GenericValue>();
+        List<GenericValue> categories = new LinkedList<>();
 
         if (Debug.verboseOn()) Debug.logVerbose("[CategoryWorker.getRelatedCategories] ParentID: " + parentId, module);
 
@@ -243,7 +243,7 @@ public final class CategoryWorker {
     }
 
     public static List<String> adjustTrail(List<String> origTrail, String currentCategoryId, String previousCategoryId) {
-        List<String> trail = new LinkedList<String>();
+        List<String> trail = new LinkedList<>();
         if (origTrail != null) {
             trail.addAll(origTrail);
         }
@@ -354,7 +354,7 @@ public final class CategoryWorker {
     }
 
     public static List<GenericValue> filterProductsInCategory(Delegator delegator, List<GenericValue> valueObjects, String productCategoryId, String productIdFieldName) throws GenericEntityException {
-        List<GenericValue> newList = new LinkedList<GenericValue>();
+        List<GenericValue> newList = new LinkedList<>();
 
         if (productCategoryId == null) return newList;
         if (valueObjects == null) return null;
@@ -405,13 +405,13 @@ public final class CategoryWorker {
         String productCategoryId = (String) context.get("productCategoryId");
         Map<String, Object> results = ServiceUtil.returnSuccess();
         Delegator delegator = dctx.getDelegator();
-        List<String> trailElements = new LinkedList<String>();
+        List<String> trailElements = new LinkedList<>();
         trailElements.add(productCategoryId);
         String parentProductCategoryId = productCategoryId;
         while (UtilValidate.isNotEmpty(parentProductCategoryId)) {
             // find product category rollup
             try {
-                List<EntityCondition> rolllupConds = new LinkedList<EntityCondition>();
+                List<EntityCondition> rolllupConds = new LinkedList<>();
                 rolllupConds.add(EntityCondition.makeCondition("productCategoryId", parentProductCategoryId));
                 rolllupConds.add(EntityUtil.getFilterByDateExpr());
                 List<GenericValue> productCategoryRollups = EntityQuery.use(delegator).from("ProductCategoryRollup").where(rolllupConds).orderBy("sequenceNum").cache(true).queryList();

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoCatalogUrlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoCatalogUrlServlet.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoCatalogUrlServlet.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoCatalogUrlServlet.java Sun Apr 21 12:49:52 2019
@@ -95,7 +95,7 @@ public class SeoCatalogUrlServlet extend
         } else if (pathElements.size() > 2) {
             List<String> trail = CategoryWorker.getTrail(request);
             if (trail == null) {
-                trail = new LinkedList<String>();
+                trail = new LinkedList<>();
             }
 
             if (trail.contains(pathElements.get(0))) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoConfigUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoConfigUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoConfigUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoConfigUtil.java Sun Apr 21 12:49:52 2019
@@ -101,13 +101,13 @@ public final class SeoConfigUtil {
      */
     public static void init() {
         String result = "success";
-        seoPatterns = new HashMap<String, Pattern>();
-        seoReplacements = new HashMap<String, String>();
-        forwardReplacements = new HashMap<String, String>();
-        forwardResponseCodes = new HashMap<String, Integer>();
-        userExceptionPatterns = new LinkedList<Pattern>();
-        specialProductIds = new HashMap<String, String>();
-        charFilters = new HashMap<String, String>();
+        seoPatterns = new HashMap<>();
+        seoReplacements = new HashMap<>();
+        forwardReplacements = new HashMap<>();
+        forwardResponseCodes = new HashMap<>();
+        userExceptionPatterns = new LinkedList<>();
+        specialProductIds = new HashMap<>();
+        charFilters = new HashMap<>();
         try {
             URL seoConfigFilename = UtilURL.fromResource(SEO_CONFIG_FILENAME);
             Document configDoc = UtilXml.readXmlDocument(seoConfigFilename, false);
@@ -135,7 +135,7 @@ public final class SeoConfigUtil {
                     
                     if (categoryUrlEnabled) {
                         String allowedContextValue = UtilXml.childElementValue(categoryUrlElement, ELEMENT_ALLOWED_CONTEXT_PATHS, null);
-                        allowedContextPaths = new HashSet<String>();
+                        allowedContextPaths = new HashSet<>();
                         if (UtilValidate.isNotEmpty(allowedContextValue)) {
                             List<String> allowedContextPathList = StringUtil.split(allowedContextValue, ALLOWED_CONTEXT_PATHS_SEPERATOR);
                             for (String path : allowedContextPathList) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java Sun Apr 21 12:49:52 2019
@@ -64,7 +64,7 @@ public class SeoContextFilter implements
     private String allowedPaths = "";
     private String redirectPath = "";
     private String errorCode = "";
-    private List<String> allowedPathList = new ArrayList<String>();
+    private List<String> allowedPathList = new ArrayList<>();
 
     public void init(FilterConfig config) throws ServletException {
         this.config = config;

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ParametricSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ParametricSearch.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ParametricSearch.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ParametricSearch.java Sun Apr 21 12:49:52 2019
@@ -59,7 +59,7 @@ public class ParametricSearch {
     }
 
     public static Map<String, List<GenericValue>> makeCategoryFeatureLists(String productCategoryId, Delegator delegator, int perTypeMaxSize) {
-        Map<String, Map<String, GenericValue>> productFeaturesByTypeMap = new HashMap<String, Map<String,GenericValue>>();
+        Map<String, Map<String, GenericValue>> productFeaturesByTypeMap = new HashMap<>();
         try {
             List<GenericValue> productFeatureCategoryAppls = EntityQuery.use(delegator).from("ProductFeatureCategoryAppl").where("productCategoryId", productCategoryId).cache(true).queryList();
             productFeatureCategoryAppls = EntityUtil.filterByDate(productFeatureCategoryAppls, true);
@@ -70,7 +70,7 @@ public class ParametricSearch {
                         String productFeatureTypeId = productFeature.getString("productFeatureTypeId");
                         Map<String, GenericValue> featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId);
                         if (featuresByType == null) {
-                            featuresByType = new HashMap<String, GenericValue>();
+                            featuresByType = new HashMap<>();
                             productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType);
                         }
                         if (featuresByType.size() < perTypeMaxSize) {
@@ -95,7 +95,7 @@ public class ParametricSearch {
                         String productFeatureTypeId = productFeature.getString("productFeatureTypeId");
                         Map<String, GenericValue> featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId);
                         if (featuresByType == null) {
-                            featuresByType = new HashMap<String, GenericValue>();
+                            featuresByType = new HashMap<>();
                             productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType);
                         }
                         if (featuresByType.size() < perTypeMaxSize) {
@@ -109,7 +109,7 @@ public class ParametricSearch {
         }
 
         // now before returning, order the features in each list by description
-        Map<String, List<GenericValue>> productFeaturesByTypeMapSorted = new HashMap<String, List<GenericValue>>();
+        Map<String, List<GenericValue>> productFeaturesByTypeMapSorted = new HashMap<>();
         for (Map.Entry<String, Map<String, GenericValue>> entry: productFeaturesByTypeMap.entrySet()) {
             List<GenericValue> sortedFeatures = EntityUtil.orderBy(entry.getValue().values(), UtilMisc.toList("description","defaultSequenceNum"));
             productFeaturesByTypeMapSorted.put(entry.getKey(), sortedFeatures);
@@ -122,15 +122,15 @@ public class ParametricSearch {
         return getAllFeaturesByType(delegator, DEFAULT_PER_TYPE_MAX_SIZE);
     }
     public static Map<String, List<GenericValue>> getAllFeaturesByType(Delegator delegator, int perTypeMaxSize) {
-        Map<String, List<GenericValue>> productFeaturesByTypeMap = new HashMap<String, List<GenericValue>>();
-        Set<String> typesWithOverflowMessages = new HashSet<String>();
+        Map<String, List<GenericValue>> productFeaturesByTypeMap = new HashMap<>();
+        Set<String> typesWithOverflowMessages = new HashSet<>();
         try (EntityListIterator productFeatureEli = EntityQuery.use(delegator).from("ProductFeature").orderBy("description").queryIterator()) {
             GenericValue productFeature = null;
             while ((productFeature = productFeatureEli.next()) != null) {
                 String productFeatureTypeId = productFeature.getString("productFeatureTypeId");
                 List<GenericValue> featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId);
                 if (featuresByType == null) {
-                    featuresByType = new LinkedList<GenericValue>();
+                    featuresByType = new LinkedList<>();
                     productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType);
                 }
                 if (featuresByType.size() > perTypeMaxSize) {
@@ -155,7 +155,7 @@ public class ParametricSearch {
 
     /** Handles parameters coming in prefixed with "pft_" where the text in the key following the prefix is a productFeatureTypeId and the value is a productFeatureId; meant to be used with drop-downs and such */
     public static Map<String, String> makeFeatureIdByTypeMap(Map<String, Object> parameters) {
-        Map<String, String> featureIdByType = new HashMap<String, String>();
+        Map<String, String> featureIdByType = new HashMap<>();
         if (parameters == null) return featureIdByType;
 
 
@@ -175,7 +175,7 @@ public class ParametricSearch {
 
     /** Handles parameters coming in prefixed with "SEARCH_FEAT" where the parameter value is a productFeatureId; meant to be used with text entry boxes or check-boxes and such */
     public static List<String> makeFeatureIdListFromPrefixed(Map<String, Object> parameters) {
-        List<String> featureIdList = new LinkedList<String>();
+        List<String> featureIdList = new LinkedList<>();
         if (parameters == null) return featureIdList;
 
         for (Map.Entry<String, Object> entry: parameters.entrySet()) {
@@ -217,7 +217,7 @@ public class ParametricSearch {
      *  meant to be used with text entry boxes or check-boxes and such
      **/
     public static List<String> makeProductFeatureCategoryIdListFromPrefixed(Map<String, Object> parameters) {
-        List<String> prodFeatureCategoryIdList = new LinkedList<String>();
+        List<String> prodFeatureCategoryIdList = new LinkedList<>();
         if (parameters == null) return prodFeatureCategoryIdList;
 
         for (Map.Entry<String, Object> entry: parameters.entrySet()) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ProductFeatureServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ProductFeatureServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ProductFeatureServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ProductFeatureServices.java Sun Apr 21 12:49:52 2019
@@ -97,8 +97,8 @@ public class ProductFeatureServices {
             if ("ProductFeatureAndAppl".equals(entityToSearch) && productFeatureApplTypeId != null)
                 allFeatures = EntityUtil.filterByAnd(allFeatures, UtilMisc.toMap("productFeatureApplTypeId", productFeatureApplTypeId));
 
-            List<String> featureTypes = new LinkedList<String>();
-            Map<String, List<GenericValue>> featuresByType = new LinkedHashMap<String, List<GenericValue>>();
+            List<String> featureTypes = new LinkedList<>();
+            Map<String, List<GenericValue>> featuresByType = new LinkedHashMap<>();
             for (GenericValue feature: allFeatures) {
                 String featureType = feature.getString("productFeatureTypeId");
                 if (!featureTypes.contains(featureType)) {
@@ -106,7 +106,7 @@ public class ProductFeatureServices {
                 }
                 List<GenericValue> features = featuresByType.get(featureType);
                 if (features == null) {
-                    features = new LinkedList<GenericValue>();
+                    features = new LinkedList<>();
                     featuresByType.put(featureType, features);
                 }
                 features.add(feature);
@@ -132,7 +132,7 @@ public class ProductFeatureServices {
 
         String productId = (String) context.get("productId");
         List<String> curProductFeatureAndAppls = UtilGenerics.checkList(context.get("productFeatureAppls"));
-        List<String> existingVariantProductIds = new LinkedList<String>();
+        List<String> existingVariantProductIds = new LinkedList<>();
 
         try {
             /*
@@ -196,20 +196,20 @@ public class ProductFeatureServices {
 
             // need to keep 2 lists, oldCombinations and newCombinations, and keep swapping them after each looping.  Otherwise, you'll get a
             // concurrent modification exception
-            List<Map<String, Object>> oldCombinations = new LinkedList<Map<String,Object>>();
+            List<Map<String, Object>> oldCombinations = new LinkedList<>();
 
             // loop through each feature type
             for (Map.Entry<String, List<GenericValue>> entry: features.entrySet()) {
                 List<GenericValue> currentFeatures = entry.getValue();
 
-                List<Map<String, Object>> newCombinations = new LinkedList<Map<String,Object>>();
+                List<Map<String, Object>> newCombinations = new LinkedList<>();
                 List<Map<String, Object>> combinations;
 
                 // start with either existing combinations or from scratch
                 if (oldCombinations.size() > 0) {
                     combinations = oldCombinations;
                 } else {
-                    combinations = new LinkedList<Map<String,Object>>();
+                    combinations = new LinkedList<>();
                 }
 
                 // in both cases, use each feature of current feature type's idCode and
@@ -219,9 +219,9 @@ public class ProductFeatureServices {
                 if (combinations.size()==0) {
                     for (GenericValue currentFeature: currentFeatures) {
                         if ("SELECTABLE_FEATURE".equals(currentFeature.getString("productFeatureApplTypeId"))) {
-                            Map<String, Object> newCombination = new HashMap<String, Object>();
-                            List<GenericValue> newFeatures = new LinkedList<GenericValue>();
-                            List<String> newFeatureIds = new LinkedList<String>();
+                            Map<String, Object> newCombination = new HashMap<>();
+                            List<GenericValue> newFeatures = new LinkedList<>();
+                            List<String> newFeatureIds = new LinkedList<>();
                             if (currentFeature.getString("idCode") != null) {
                                 newCombination.put("defaultVariantProductId", productId + currentFeature.getString("idCode"));
                             } else {
@@ -238,7 +238,7 @@ public class ProductFeatureServices {
                     for (Map<String, Object> combination: combinations) {
                         for (GenericValue currentFeature: currentFeatures) {
                             if ("SELECTABLE_FEATURE".equals(currentFeature.getString("productFeatureApplTypeId"))) {
-                                Map<String, Object> newCombination = new HashMap<String, Object>();
+                                Map<String, Object> newCombination = new HashMap<>();
                                 // .clone() is important, or you'll keep adding to the same List for all the variants
                                 // have to cast twice: once from get() and once from clone()
                                 List<GenericValue> newFeatures = UtilMisc.makeListWritable(UtilGenerics.<GenericValue>checkList(combination.get("curProductFeatureAndAppls")));
@@ -263,7 +263,7 @@ public class ProductFeatureServices {
             }
 
             int defaultCodeCounter = 1;
-            Set<String> defaultVariantProductIds = new HashSet<String>(); // this map will contain the codes already used (as keys)
+            Set<String> defaultVariantProductIds = new HashSet<>(); // this map will contain the codes already used (as keys)
             defaultVariantProductIds.add(productId);
 
             // now figure out which of these combinations already have productIds associated with them
@@ -293,7 +293,7 @@ public class ProductFeatureServices {
      * Result: products (a List of Product GenericValues)
      */
     public static Map<String, Object> getCategoryVariantProducts(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map<String, Object> results = new HashMap<String, Object>();
+        Map<String, Object> results = new HashMap<>();
         LocalDispatcher dispatcher = dctx.getDispatcher();
 
         List<GenericValue> productFeatures = UtilGenerics.checkList(context.get("productFeatures"));
@@ -312,12 +312,12 @@ public class ProductFeatureServices {
         List<GenericValue> memberProducts = UtilGenerics.checkList(result.get("categoryMembers"));
         if ((memberProducts != null) && (memberProducts.size() > 0)) {
             // construct a Map of productFeatureTypeId -> productFeatureId from the productFeatures List
-            Map<String, String> featuresByType = new HashMap<String, String>();
+            Map<String, String> featuresByType = new HashMap<>();
             for (GenericValue nextFeature: productFeatures) {
                 featuresByType.put(nextFeature.getString("productFeatureTypeId"), nextFeature.getString("productFeatureId"));
             }
 
-            List<GenericValue> products = new LinkedList<GenericValue>(); // final list of variant products
+            List<GenericValue> products = new LinkedList<>(); // final list of variant products
             for (GenericValue memberProduct: memberProducts) {
                 // find variants for each member product of the category
 

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java Sun Apr 21 12:49:52 2019
@@ -82,7 +82,7 @@ public class PriceServices {
     public static Map<String, Object> calculateProductPrice(DispatchContext dctx, Map<String, ? extends Object> context) {
         Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
-        Map<String, Object> result = new HashMap<String, Object>();
+        Map<String, Object> result = new HashMap<>();
         Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
 
         GenericValue product = (GenericValue) context.get("product");
@@ -201,7 +201,7 @@ public class PriceServices {
 
         BigDecimal amount = (BigDecimal) context.get("amount");
 
-        List<EntityCondition> productPriceEcList = new LinkedList<EntityCondition>();
+        List<EntityCondition> productPriceEcList = new LinkedList<>();
         productPriceEcList.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId));
         // this funny statement is for backward compatibility purposes; the productPricePurposeId is a new pk field on the ProductPrice entity and in order databases may not be populated, until the pk is updated and such; this will ease the transition somewhat
         if ("PURCHASE".equals(productPricePurposeId)) {
@@ -333,7 +333,7 @@ public class PriceServices {
 
         boolean validPriceFound = false;
         BigDecimal defaultPrice = BigDecimal.ZERO;
-        List<GenericValue> orderItemPriceInfos = new LinkedList<GenericValue>();
+        List<GenericValue> orderItemPriceInfos = new LinkedList<>();
         if (defaultPriceValue != null) {
             // If a price calc formula (service) is specified, then use it to get the unit price
             if ("ProductPrice".equals(defaultPriceValue.getEntityName()) && UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
@@ -417,8 +417,8 @@ public class PriceServices {
                 List<GenericValue> nonQuantityProductPriceRules = null;
                 if (findAllQuantityPrices) {
                     // split into list with quantity conditions and list without, then iterate through each quantity cond one
-                    quantityProductPriceRules = new LinkedList<GenericValue>();
-                    nonQuantityProductPriceRules = new LinkedList<GenericValue>();
+                    quantityProductPriceRules = new LinkedList<>();
+                    nonQuantityProductPriceRules = new LinkedList<>();
                     for (GenericValue productPriceRule: allProductPriceRules) {
                         List<GenericValue> productPriceCondList = EntityQuery.use(delegator).from("ProductPriceCond").where("productPriceRuleId", productPriceRule.get("productPriceRuleId")).cache(true).queryList();
 
@@ -444,12 +444,12 @@ public class PriceServices {
                 }
 
                 if (findAllQuantityPrices) {
-                    List<Map<String, Object>> allQuantityPrices = new LinkedList<Map<String,Object>>();
+                    List<Map<String, Object>> allQuantityPrices = new LinkedList<>();
 
                     // if findAllQuantityPrices then iterate through quantityProductPriceRules
                     // foreach create an entry in the out list and eval that rule and all nonQuantityProductPriceRules rather than a single rule
                     for (GenericValue quantityProductPriceRule: quantityProductPriceRules) {
-                        List<GenericValue> ruleListToUse = new LinkedList<GenericValue>();
+                        List<GenericValue> ruleListToUse = new LinkedList<>();
                         ruleListToUse.add(quantityProductPriceRule);
                         ruleListToUse.addAll(nonQuantityProductPriceRules);
 
@@ -516,7 +516,7 @@ public class PriceServices {
         if ("true".equals(EntityUtilProperties.getPropertyValue("catalog", "convertProductPriceCurrency", delegator))) {
             if (UtilValidate.isNotEmpty(currencyDefaultUomId) && UtilValidate.isNotEmpty(currencyUomIdTo) && !currencyDefaultUomId.equals(currencyUomIdTo)) {
                 if (UtilValidate.isNotEmpty(result)) {
-                    Map<String, Object> convertPriceMap = new HashMap<String, Object>();
+                    Map<String, Object> convertPriceMap = new HashMap<>();
                     for (Map.Entry<String, Object> entry : result.entrySet()) {
                         BigDecimal tempPrice;
                         switch (entry.getKey()) {
@@ -535,7 +535,7 @@ public class PriceServices {
                         }
                         
                         if (tempPrice != null && tempPrice != BigDecimal.ZERO) {
-                            Map<String, Object> priceResults = new HashMap<String, Object>();
+                            Map<String, Object> priceResults = new HashMap<>();
                             try {
                                 priceResults = dispatcher.runSync("convertUom", UtilMisc.<String, Object> toMap("uomId", currencyDefaultUomId, "uomIdTo", currencyUomIdTo,
                                         "originalValue", tempPrice, "defaultDecimalScale", 2L, "defaultRoundingMode", "HalfUp"));
@@ -634,7 +634,7 @@ public class PriceServices {
         // Genercally I don't think that rule sets will get that big though, so the default is optimize for smaller rule set.
         if (optimizeForLargeRuleSet) {
             // ========= find all rules that must be run for each input type; this is kind of like a pre-filter to slim down the rules to run =========
-            TreeSet<String> productPriceRuleIds = new TreeSet<String>();
+            TreeSet<String> productPriceRuleIds = new TreeSet<>();
 
             // ------- These are all of the conditions that DON'T depend on the current inputs -------
 
@@ -754,7 +754,7 @@ public class PriceServices {
                 }
             }
 
-            productPriceRules = new LinkedList<GenericValue>();
+            productPriceRules = new LinkedList<>();
             for (String productPriceRuleId: productPriceRuleIds) {
                 GenericValue productPriceRule = EntityQuery.use(delegator).from("ProductPriceRule").where("productPriceRuleId", productPriceRuleId).cache().queryOne();
                 if (productPriceRule == null) continue;
@@ -762,7 +762,7 @@ public class PriceServices {
             }
         } else {
             productPriceRules = EntityQuery.use(delegator).from("ProductPriceRule").cache(true).queryList();
-            if (productPriceRules == null) productPriceRules = new LinkedList<GenericValue>();
+            if (productPriceRules == null) productPriceRules = new LinkedList<>();
         }
 
         return productPriceRules;
@@ -774,9 +774,9 @@ public class PriceServices {
         String webSiteId, String partyId, BigDecimal quantity, String currencyUomId, Delegator delegator, Timestamp nowTimestamp,
         Locale locale) throws GenericEntityException {
 
-        Map<String, Object> calcResults = new HashMap<String, Object>();
+        Map<String, Object> calcResults = new HashMap<>();
 
-        List<GenericValue> orderItemPriceInfos = new LinkedList<GenericValue>();
+        List<GenericValue> orderItemPriceInfos = new LinkedList<>();
         boolean isSale = false;
 
         // ========= go through each price rule by id and eval all conditions =========
@@ -1205,9 +1205,9 @@ public class PriceServices {
     public static Map<String, Object> calculatePurchasePrice(DispatchContext dctx, Map<String, ? extends Object> context) {
         Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
-        Map<String, Object> result = new HashMap<String, Object>();
+        Map<String, Object> result = new HashMap<>();
 
-        List<GenericValue> orderItemPriceInfos = new LinkedList<GenericValue>();
+        List<GenericValue> orderItemPriceInfos = new LinkedList<>();
         boolean validPriceFound = false;
         BigDecimal price = BigDecimal.ZERO;
 

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java Sun Apr 21 12:49:52 2019
@@ -55,7 +55,7 @@ import org.apache.ofbiz.webapp.website.W
 public final class ProductStoreWorker {
 
     public static final String module = ProductStoreWorker.class.getName();
-    private static Map<String, String> defaultProductStoreEmailScreenLocation = new HashMap<String, String>();
+    private static Map<String, String> defaultProductStoreEmailScreenLocation = new HashMap<>();
 
     static {
         defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CONFIRM", "component://ecommerce/widget/EmailOrderScreens.xml#OrderConfirmNotice");
@@ -257,7 +257,7 @@ public final class ProductStoreWorker {
 
     public static List<GenericValue> getAvailableStoreShippingMethods(Delegator delegator, String productStoreId, GenericValue shippingAddress, List<BigDecimal> itemSizes, Map<String, BigDecimal> featureIdMap, BigDecimal weight, BigDecimal orderTotal) {
         if (featureIdMap == null) {
-            featureIdMap = new HashMap<String, BigDecimal>();
+            featureIdMap = new HashMap<>();
         }
         List<GenericValue> shippingMethods = null;
         try {
@@ -483,7 +483,7 @@ public final class ProductStoreWorker {
     }
 
     public static List<GenericValue> getSurveys(Delegator delegator, String productStoreId, String groupName, String productId, String surveyApplTypeId, String parentProductId) {
-        List<GenericValue> surveys = new LinkedList<GenericValue>();
+        List<GenericValue> surveys = new LinkedList<>();
         List<GenericValue> storeSurveys = null;
         try {
             storeSurveys = EntityQuery.use(delegator).from("ProductStoreSurveyAppl").where("productStoreId", productStoreId, "surveyApplTypeId", surveyApplTypeId).orderBy("sequenceNum").cache(true).queryList();

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java Sun Apr 21 12:49:52 2019
@@ -88,12 +88,12 @@ public class PackingSession implements j
         this.picklistBinId = binId;
         this.userLogin = userLogin;
         this.facilityId = facilityId;
-        this.packLines = new LinkedList<PackingSessionLine>();
-        this.packEvents = new LinkedList<PackingEvent>();
-        this.itemInfos = new LinkedList<PackingSession.ItemDisplay>();
+        this.packLines = new LinkedList<>();
+        this.packEvents = new LinkedList<>();
+        this.itemInfos = new LinkedList<>();
         this.packageSeq = 1;
-        this.packageWeights = new HashMap<Integer, BigDecimal>();
-        this.shipmentBoxTypes = new HashMap<Integer, String>();
+        this.packageWeights = new HashMap<>();
+        this.shipmentBoxTypes = new HashMap<>();
     }
 
     public PackingSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) {
@@ -130,7 +130,7 @@ public class PackingSession implements j
         }
 
         // get the reservations for the item
-        Map<String, Object> invLookup = new HashMap<String, Object>();
+        Map<String, Object> invLookup = new HashMap<>();
         invLookup.put("orderId", orderId);
         invLookup.put("orderItemSeqId", orderItemSeqId);
         invLookup.put("shipGroupSeqId", shipGroupSeqId);
@@ -153,7 +153,7 @@ public class PackingSession implements j
             }
         } else {
             // more than one reservation found
-            Map<GenericValue, BigDecimal> toCreateMap = new HashMap<GenericValue, BigDecimal>();
+            Map<GenericValue, BigDecimal> toCreateMap = new HashMap<>();
             Iterator<GenericValue> i = reservations.iterator();
             BigDecimal qtyRemain = quantity;
 
@@ -278,7 +278,7 @@ public class PackingSession implements j
     }
 
     protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity) throws GeneralException {
-        Map<String, Object> lookupMap = new HashMap<String, Object>();
+        Map<String, Object> lookupMap = new HashMap<>();
         lookupMap.put("orderId", orderId);
         lookupMap.put("productId", productId);
         lookupMap.put("statusId", "ITEM_APPROVED");
@@ -291,7 +291,7 @@ public class PackingSession implements j
         if (orderItems != null) {
             for (GenericValue item: orderItems) {
                 // get the reservations for the item
-                Map<String, Object> invLookup = new HashMap<String, Object>();
+                Map<String, Object> invLookup = new HashMap<>();
                 invLookup.put("orderId", orderId);
                 invLookup.put("orderItemSeqId", item.getString("orderItemSeqId"));
                 invLookup.put("shipGroupSeqId", shipGroupSeqId);
@@ -372,23 +372,23 @@ public class PackingSession implements j
      * @return result Map with packageMap and sortedKeys
      */
     public Map<Object, Object> getPackingSessionLinesByPackage() {
-        Map<Integer, List<PackingSessionLine>> packageMap = new HashMap<Integer, List<PackingSessionLine>>();
+        Map<Integer, List<PackingSessionLine>> packageMap = new HashMap<>();
         for (PackingSessionLine line : packLines) {
            int pSeq = line.getPackageSeq();
            List<PackingSessionLine> packageLineList = packageMap.get(pSeq);
            if (packageLineList == null) {
-               packageLineList = new LinkedList<PackingSessionLine>();
+               packageLineList = new LinkedList<>();
                packageMap.put(pSeq, packageLineList);
            }
            packageLineList.add(line);
         }
         Object[] keys = packageMap.keySet().toArray();
         java.util.Arrays.sort(keys);
-        List<Object> sortedKeys = new LinkedList<Object>();
+        List<Object> sortedKeys = new LinkedList<>();
         for (Object key : keys) {
             sortedKeys.add(key);
         }
-        Map<Object, Object> result = new HashMap<Object, Object>();
+        Map<Object, Object> result = new HashMap<>();
         result.put("packageMap", packageMap);
         result.put("sortedKeys", sortedKeys);
         return result;
@@ -503,7 +503,7 @@ public class PackingSession implements j
     }
 
     public List<String> getCurrentShipmentIds(String orderId, String orderItemSeqId, String shipGroupSeqId) {
-        Set<String> shipmentIds = new HashSet<String>();
+        Set<String> shipmentIds = new HashSet<>();
         List<GenericValue> issues = this.getItemIssuances(orderId, orderItemSeqId, shipGroupSeqId);
 
         if (issues != null) {
@@ -512,7 +512,7 @@ public class PackingSession implements j
             }
         }
 
-        List<String> retList = new LinkedList<String>();
+        List<String> retList = new LinkedList<>();
         retList.addAll(shipmentIds);
         return retList;
     }
@@ -681,7 +681,7 @@ public class PackingSession implements j
     }
 
     protected void checkReservations(boolean ignore) throws GeneralException {
-        List<String> errors = new LinkedList<String>();
+        List<String> errors = new LinkedList<>();
         for (PackingSessionLine line: this.getLines()) {
             BigDecimal reservedQty =  this.getCurrentReservedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId());
             BigDecimal packedQty = this.getPackedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId());
@@ -701,7 +701,7 @@ public class PackingSession implements j
     }
 
     protected void checkEmptyLines() throws GeneralException {
-        List<PackingSessionLine> lines = new LinkedList<PackingSessionLine>();
+        List<PackingSessionLine> lines = new LinkedList<>();
         lines.addAll(this.getLines());
         for (PackingSessionLine l: lines) {
             if (l.getQuantity().compareTo(BigDecimal.ZERO) == 0) {
@@ -724,7 +724,7 @@ public class PackingSession implements j
             throw new IllegalArgumentException("Value for orderId is  null");
         }
 
-        Map<String, Object> lookupMap = new HashMap<String, Object>();
+        Map<String, Object> lookupMap = new HashMap<>();
         lookupMap.put("orderId", orderId);
         if (UtilValidate.isNotEmpty(orderItemSeqId)) {
             lookupMap.put("orderItemSeqId", orderItemSeqId);
@@ -744,7 +744,7 @@ public class PackingSession implements j
     protected void createShipment() throws GeneralException {
         // first create the shipment
         Delegator delegator = this.getDelegator();
-        Map<String, Object> newShipment = new HashMap<String, Object>();
+        Map<String, Object> newShipment = new HashMap<>();
         newShipment.put("originFacilityId", this.facilityId);
         newShipment.put("primaryShipGroupSeqId", primaryShipGrp);
         newShipment.put("primaryOrderId", primaryOrderId);
@@ -796,7 +796,7 @@ public class PackingSession implements j
     }
 
     protected void issueItemsToShipment() throws GeneralException {
-        List<PackingSessionLine> processedLines = new LinkedList<PackingSessionLine>();
+        List<PackingSessionLine> processedLines = new LinkedList<>();
         for (PackingSessionLine line: this.getLines()) {
             if (this.checkLine(processedLines, line)) {
                 BigDecimal totalPacked = this.getPackedQuantity(line.getOrderId(),  line.getOrderItemSeqId(),
@@ -823,7 +823,7 @@ public class PackingSession implements j
         for (int i = 0; i < packageSeq; i++) {
             String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(i+1, 5);
 
-            Map<String, Object> pkgCtx = new HashMap<String, Object>();
+            Map<String, Object> pkgCtx = new HashMap<>();
             pkgCtx.put("shipmentId", shipmentId);
             pkgCtx.put("shipmentPackageSeqId", shipmentPackageSeqId);
             pkgCtx.put("shipmentBoxTypeId", getShipmentBoxType(i+1));
@@ -870,7 +870,7 @@ public class PackingSession implements j
             // first find the picklist id
             GenericValue bin = this.getDelegator().findOne("PicklistBin", UtilMisc.toMap("picklistBinId", picklistBinId), false);
             if (bin != null) {
-                Map<String, Object> ctx = new HashMap<String, Object>();
+                Map<String, Object> ctx = new HashMap<>();
                 ctx.put("picklistId", bin.getString("picklistId"));
                 ctx.put("partyId", pickerPartyId);
                 ctx.put("roleTypeId", "PICKER");
@@ -927,7 +927,7 @@ public class PackingSession implements j
         BigDecimal shipmentCostEstimate = null;
         Map<String, Object> serviceResult = null;
         try {
-            Map<String, Object> serviceContext = new HashMap<String, Object>();
+            Map<String, Object> serviceContext = new HashMap<>();
             serviceContext.put("shippingContactMechId", shippingContactMechId);
             serviceContext.put("shipmentMethodTypeId", shipmentMethodTypeId);
             serviceContext.put("carrierPartyId", carrierPartyId);
@@ -935,7 +935,7 @@ public class PackingSession implements j
             serviceContext.put("productStoreId", productStoreId);
 
             if (UtilValidate.isEmpty(shippableItemInfo)) {
-                shippableItemInfo = new LinkedList<GenericValue>();
+                shippableItemInfo = new LinkedList<>();
                 for (PackingSessionLine line: getLines()) {
                     List<GenericValue> oiasgas = getDelegator().findByAnd("OrderItemAndShipGroupAssoc", UtilMisc.toMap("orderId", line.getOrderId(), "orderItemSeqId", line.getOrderItemSeqId(), "shipGroupSeqId", line.getShipGroupSeqId()), null, false);
                     shippableItemInfo.addAll(oiasgas);
@@ -992,7 +992,7 @@ public class PackingSession implements j
     }
 
     public List<Integer> getPackageSeqIds() {
-        Set<Integer> packageSeqIds = new TreeSet<Integer>();
+        Set<Integer> packageSeqIds = new TreeSet<>();
         if (! UtilValidate.isEmpty(this.getLines())) {
             for (PackingSessionLine line: this.getLines()) {
                 packageSeqIds.add(line.getPackageSeq());

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSessionLine.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSessionLine.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSessionLine.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSessionLine.java Sun Apr 21 12:49:52 2019
@@ -181,7 +181,7 @@ public class PackingSessionLine implemen
             quantity = this.getQuantity();
         }
 
-        Map<String, Object> issueMap = new HashMap<String, Object>();
+        Map<String, Object> issueMap = new HashMap<>();
         issueMap.put("shipmentId", shipmentId);
         issueMap.put("orderId", this.getOrderId());
         issueMap.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -206,7 +206,7 @@ public class PackingSessionLine implemen
             // find the pick list item
             Debug.logInfo("Looking up picklist item for bin ID #" + picklistBinId, module);
             Delegator delegator = dispatcher.getDelegator();
-            Map<String, Object> itemLookup = new HashMap<String, Object>();
+            Map<String, Object> itemLookup = new HashMap<>();
             itemLookup.put("picklistBinId", picklistBinId);
             itemLookup.put("orderId", this.getOrderId());
             itemLookup.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -243,7 +243,7 @@ public class PackingSessionLine implemen
         // assign item to package
         String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(this.getPackageSeq(), 5);
 
-        Map<String, Object> packageMap = new HashMap<String, Object>();
+        Map<String, Object> packageMap = new HashMap<>();
         packageMap.put("shipmentId", shipmentId);
         packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId());
         packageMap.put("quantity", this.getQuantity());

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/picklist/PickListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/picklist/PickListServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/picklist/PickListServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/picklist/PickListServices.java Sun Apr 21 12:49:52 2019
@@ -49,8 +49,8 @@ public class PickListServices {
         if (orderHeaderList == null) {
             // convert the ID list to headers
             if (orderIdList != null) {
-                List<EntityCondition> conditionList1 = new LinkedList<EntityCondition>();
-                List<EntityCondition> conditionList2 = new LinkedList<EntityCondition>();
+                List<EntityCondition> conditionList1 = new LinkedList<>();
+                List<EntityCondition> conditionList2 = new LinkedList<>();
 
                 // we are only concerned about approved sales orders
                 conditionList2.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_APPROVED"));

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java Sun Apr 21 12:49:52 2019
@@ -65,10 +65,10 @@ public class ShipmentServices {
     public static final BigDecimal ZERO = BigDecimal.ZERO.setScale(decimals, rounding);
 
     public static Map<String, Object> createShipmentEstimate(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map<String, Object> result = new HashMap<String, Object>();
+        Map<String, Object> result = new HashMap<>();
         Delegator delegator = dctx.getDelegator();
         Locale locale = (Locale) context.get("locale");
-        List<GenericValue> storeAll = new LinkedList<GenericValue>();
+        List<GenericValue> storeAll = new LinkedList<>();
         String productStoreShipMethId = (String)context.get("productStoreShipMethId");
 
         GenericValue productStoreShipMeth = null;
@@ -292,7 +292,7 @@ public class ShipmentServices {
             shipAddress.set("postalCodeGeoId", shippingPostalCode);
         }
         // Get the possible estimates.
-        List<GenericValue> estimateList = new LinkedList<GenericValue>();
+        List<GenericValue> estimateList = new LinkedList<>();
 
         for (GenericValue thisEstimate: estimates) {
             try {
@@ -370,8 +370,8 @@ public class ShipmentServices {
         }
 
         // make the shippable item size/feature objects
-        List<BigDecimal> shippableItemSizes = new LinkedList<BigDecimal>();
-        Map<String, BigDecimal> shippableFeatureMap = new HashMap<String, BigDecimal>();
+        List<BigDecimal> shippableItemSizes = new LinkedList<>();
+        Map<String, BigDecimal> shippableFeatureMap = new HashMap<>();
         if (shippableItemInfo != null) {
             for (Map<String, Object> itemMap: shippableItemInfo) {
                 // add the item sizes
@@ -412,7 +412,7 @@ public class ShipmentServices {
         int estimateIndex = 0;
 
         if (estimateList.size() > 1) {
-            TreeMap<Integer, GenericValue> estimatePriority = new TreeMap<Integer, GenericValue>();
+            TreeMap<Integer, GenericValue> estimatePriority = new TreeMap<>();
 
             for (GenericValue currentEstimate: estimateList) {
                 int prioritySum = 0;
@@ -615,7 +615,7 @@ public class ShipmentServices {
             GenericValue routeSeg = EntityUtil.getFirst(routeSegs);
 
             // to store list
-            List<GenericValue> toStore = new LinkedList<GenericValue>();
+            List<GenericValue> toStore = new LinkedList<>();
 
             // make the staging records
             GenericValue stageShip = delegator.makeValue("OdbcShipmentOut");
@@ -667,7 +667,7 @@ public class ShipmentServices {
         Delegator delegator = dctx.getDelegator();
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
-        Map<String, String> shipmentMap = new HashMap<String, String>();
+        Map<String, String> shipmentMap = new HashMap<>();
 
         EntityQuery eq = EntityQuery.use(delegator)
                 .from("OdbcPackageIn")
@@ -704,7 +704,7 @@ public class ShipmentServices {
                             delegator.store(rtSeg);
                     }
 
-                    Map<String, Object> pkgCtx = new HashMap<String, Object>();
+                    Map<String, Object> pkgCtx = new HashMap<>();
                     pkgCtx.put("shipmentId", shipmentId);
                     pkgCtx.put("shipmentPackageSeqId", packageSeqId);
 
@@ -755,7 +755,7 @@ public class ShipmentServices {
         for (Map.Entry<String, String> entry: shipmentMap.entrySet()) {
             String shipmentId = entry.getKey();
             String voidInd = entry.getValue();
-            Map<String, Object> shipCtx = new HashMap<String, Object>();
+            Map<String, Object> shipCtx = new HashMap<>();
             shipCtx.put("shipmentId", shipmentId);
             if ("Y".equals(voidInd)) {
                 shipCtx.put("statusId", "SHIPMENT_CANCELLED");
@@ -836,7 +836,7 @@ public class ShipmentServices {
             }
 
             // store the quantity of each product shipped in a hashmap keyed to productId
-            Map<String, BigDecimal> shippedCountMap = new HashMap<String, BigDecimal>();
+            Map<String, BigDecimal> shippedCountMap = new HashMap<>();
             for (GenericValue item: shipmentAndItems) {
                 BigDecimal shippedQuantity = item.getBigDecimal("quantity");
                 BigDecimal quantity = shippedCountMap.get(item.getString("productId"));
@@ -845,7 +845,7 @@ public class ShipmentServices {
             }
 
             // store the quantity of each product received in a hashmap keyed to productId
-            Map<String, BigDecimal> receivedCountMap = new HashMap<String, BigDecimal>();
+            Map<String, BigDecimal> receivedCountMap = new HashMap<>();
             for (GenericValue item: shipmentReceipts) {
                 BigDecimal receivedQuantity = item.getBigDecimal("quantityAccepted");
                 BigDecimal quantity = receivedCountMap.get(item.getString("productId"));
@@ -1052,7 +1052,7 @@ public class ShipmentServices {
         Locale localePar = (Locale) context.get("locale");
         
         // prepare the shipment information
-        Map<String, Object> sendMap = new HashMap<String, Object>();
+        Map<String, Object> sendMap = new HashMap<>();
         GenericValue shipment = null ;
         GenericValue orderHeader = null;
         try {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentWorker.java Sun Apr 21 12:49:52 2019
@@ -110,7 +110,7 @@ public final class ShipmentWorker {
 
     public static List<Map<String, BigDecimal>> getPackageSplit(DispatchContext dctx, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight) {
         // create the package list w/ the first package
-        List<Map<String, BigDecimal>> packages = new LinkedList<Map<String,BigDecimal>>();
+        List<Map<String, BigDecimal>> packages = new LinkedList<>();
 
         if (UtilValidate.isNotEmpty(shippableItemInfo)) {
             for (Map<String, Object> itemInfo: shippableItemInfo) {
@@ -128,7 +128,7 @@ public final class ShipmentWorker {
                     BigDecimal partialQty = pieces > 1 ? BigDecimal.ONE.divide(BigDecimal.valueOf(pieces), generalRounding) : BigDecimal.ONE;
                     for (long x = 0; x < pieces; x++) {
                         if (weight.compareTo(maxWeight) >= 0) {
-                            Map<String, BigDecimal> newPackage = new HashMap<String, BigDecimal>();
+                            Map<String, BigDecimal> newPackage = new HashMap<>();
                             newPackage.put(productId, partialQty);
                             packages.add(newPackage);
                         } else if (totalWeight.compareTo(BigDecimal.ZERO) > 0) {
@@ -151,7 +151,7 @@ public final class ShipmentWorker {
                                 }
                             }
                             if (!addedToPackage) {
-                                Map<String, BigDecimal> packageMap = new HashMap<String, BigDecimal>();
+                                Map<String, BigDecimal> packageMap = new HashMap<>();
                                 packageMap.put(productId, partialQty);
                                 packages.add(packageMap);
                             }
@@ -186,7 +186,7 @@ public final class ShipmentWorker {
             }
             if (!"WT_lb".equals(weightUomId)) {
                 // attempt a conversion to pounds
-                Map<String, Object> result = new HashMap<String, Object>();
+                Map<String, Object> result = new HashMap<>();
                 try {
                     result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", productWeight));
                     if (ServiceUtil.isError(result)) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java Sun Apr 21 12:49:52 2019
@@ -243,7 +243,7 @@ public class DhlServices {
                     "FacilityShipmentDhlShipmentTemplateLocationNotFound", locale));
         }
         StringWriter outWriter = new StringWriter();
-        Map<String, Object> inContext = new HashMap<String, Object>();
+        Map<String, Object> inContext = new HashMap<>();
         inContext.put("action", "RateEstimate");
         inContext.put("userid", userid);
         inContext.put("password", password);
@@ -319,8 +319,8 @@ public class DhlServices {
      * Parses an XML document from DHL to get the rate estimate
      */
     public static Map<String, Object> handleDhlRateResponse(Document rateResponseDocument, Locale locale) {
-        List<Object> errorList = new LinkedList<Object>();
-        Map<String, Object> dhlRateCodeMap = new HashMap<String, Object>();
+        List<Object> errorList = new LinkedList<>();
+        Map<String, Object> dhlRateCodeMap = new HashMap<>();
         // process RateResponse
         Element rateResponseElement = rateResponseDocument.getDocumentElement();
         DhlServices.handleErrors(rateResponseElement, errorList, locale);
@@ -355,10 +355,10 @@ public class DhlServices {
         List<? extends Element> chargeNodeList = UtilXml.childElementList(responseChargesElement,
                 "Charge");
 
-        List<Map<String, String>> chargeList = new LinkedList<Map<String,String>>();
+        List<Map<String, String>> chargeList = new LinkedList<>();
         if (UtilValidate.isNotEmpty(chargeNodeList)) {
             for (Element responseChargeElement: chargeNodeList) {
-                Map<String, String> charge = new HashMap<String, String>();
+                Map<String, String> charge = new HashMap<>();
 
                 Element responseChargeTypeElement = UtilXml.firstChildElement(
                         responseChargeElement, "Type");
@@ -471,7 +471,7 @@ public class DhlServices {
      * Parse response from DHL registration request to get shipping key
      */
     public static Map<String, Object> handleDhlRegisterResponse(Document registerResponseDocument, Locale locale) {
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         // process RegisterResponse
         Element registerResponseElement = registerResponseDocument.getDocumentElement();
         DhlServices.handleErrors(registerResponseElement, errorList, locale);
@@ -732,7 +732,7 @@ public class DhlServices {
                         "FacilityShipmentDhlRateEstimateTemplateNotConfigured", locale));
             }
             StringWriter outWriter = new StringWriter();
-            Map<String, Object> inContext = new HashMap<String, Object>();
+            Map<String, Object> inContext = new HashMap<>();
             inContext.put("action", "GenerateLabel");
             inContext.put("userid", userid);
             inContext.put("password", password);

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex/FedexServices.java Sun Apr 21 12:49:52 2019
@@ -152,7 +152,7 @@ public class FedexServices {
         String shipmentGatewayConfigId = (String) context.get("shipmentGatewayConfigId");
         String resource = (String) context.get("configProps");
         Locale locale = (Locale) context.get("locale");
-        List<Object> errorList = new LinkedList<Object> ();
+        List<Object> errorList = new LinkedList<> ();
 
         Boolean replaceMeterNumber = (Boolean) context.get("replaceMeterNumber");
 
@@ -168,7 +168,7 @@ public class FedexServices {
         String companyPartyId = (String) context.get("companyPartyId");
         String contactPartyName = (String) context.get("contactPartyName");
 
-        Map<String, Object> result = new HashMap<String, Object>();
+        Map<String, Object> result = new HashMap<>();
 
         String accountNumber = getShipmentGatewayConfigValue(delegator, shipmentGatewayConfigId, "accessAccountNbr", resource, "shipment.fedex.access.accountNbr");
         if (UtilValidate.isEmpty(accountNumber)) {
@@ -214,7 +214,7 @@ public class FedexServices {
                     .queryList();
 
             // Get the first valid postal address (address1, city, postalCode and countryGeoId are required by Fedex)
-            List<EntityCondition> postalAddressConditions = new LinkedList<EntityCondition>();
+            List<EntityCondition> postalAddressConditions = new LinkedList<>();
             postalAddressConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "POSTAL_ADDRESS"));
             postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, null));
             postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, ""));
@@ -254,7 +254,7 @@ public class FedexServices {
             }
 
             // Get the first valid primary phone number (required by Fedex)
-            List<EntityCondition> phoneNumberConditions = new LinkedList<EntityCondition>();
+            List<EntityCondition> phoneNumberConditions = new LinkedList<>();
             phoneNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
             phoneNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "PRIMARY_PHONE"));
             phoneNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null));
@@ -278,7 +278,7 @@ public class FedexServices {
             phoneNumber = phoneNumber.replaceAll("[^+\\d]", "");
 
             // Get the first valid fax number
-            List<EntityCondition> faxNumberConditions = new LinkedList<EntityCondition>();
+            List<EntityCondition> faxNumberConditions = new LinkedList<>();
             faxNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
             faxNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "FAX_NUMBER"));
             faxNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null));
@@ -297,7 +297,7 @@ public class FedexServices {
             }
 
             // Get the first valid email address
-            List<EntityCondition> emailConditions = new LinkedList<EntityCondition>();
+            List<EntityCondition> emailConditions = new LinkedList<>();
             emailConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "EMAIL_ADDRESS"));
             emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, null));
             emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, ""));
@@ -316,7 +316,7 @@ public class FedexServices {
             }
 
             // Populate the Freemarker context
-            Map<String, Object> subscriptionRequestContext = new HashMap<String, Object>();
+            Map<String, Object> subscriptionRequestContext = new HashMap<>();
             subscriptionRequestContext.put("AccountNumber", accountNumber);
             subscriptionRequestContext.put("PersonName", contactPartyName);
             subscriptionRequestContext.put("CompanyName", companyName);
@@ -474,7 +474,7 @@ public class FedexServices {
         }
 
         try {
-            Map<String, Object> shipRequestContext = new HashMap<String, Object>();
+            Map<String, Object> shipRequestContext = new HashMap<>();
 
             // Get the shipment and the shipmentRouteSegment
             GenericValue shipment = EntityQuery.use(delegator).from("Shipment").where("shipmentId", shipmentId).queryOne();
@@ -981,7 +981,7 @@ public class FedexServices {
      */
     public static Map<String, Object> handleFedexShipReply(String fDXShipReplyString, GenericValue shipmentRouteSegment,
             List<GenericValue> shipmentPackageRouteSegs, Locale locale) throws GenericEntityException {
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegs.get(0);
 
         Document fdxShipReplyDocument = null;

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/ups/UpsServices.java Sun Apr 21 12:49:52 2019
@@ -79,8 +79,8 @@ public class UpsServices {
 
     public final static String module = UpsServices.class.getName();
 
-    private static final Map<String, String> unitsUpsToOfbiz = new HashMap<String, String>();
-    private static final Map<String, String> unitsOfbizToUps = new HashMap<String, String>();
+    private static final Map<String, String> unitsUpsToOfbiz = new HashMap<>();
+    private static final Map<String, String> unitsOfbizToUps = new HashMap<>();
     static {
         unitsUpsToOfbiz.put("LBS", "WT_lb");
         unitsUpsToOfbiz.put("KGS", "WT_kg");
@@ -214,7 +214,7 @@ public class UpsServices {
             }
 
             List<GenericValue> itemIssuances = shipment.getRelated("ItemIssuance", null, null, false);
-            Set<String> orderIdSet = new TreeSet<String>();
+            Set<String> orderIdSet = new TreeSet<>();
             for (GenericValue itemIssuance: itemIssuances) {
                 orderIdSet.add(itemIssuance.getString("orderId"));
             }
@@ -707,7 +707,7 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(shipmentConfirmResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         if ("1".equals(responseStatusCode)) {
@@ -979,7 +979,7 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(shipmentAcceptResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         if ("1".equals(responseStatusCode)) {
@@ -1349,7 +1349,7 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(voidShipmentResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         // handle other response elements
@@ -1546,7 +1546,7 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(trackResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         if ("1".equals(responseStatusCode)) {
@@ -1745,12 +1745,12 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(rateResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         if ("1".equals(responseStatusCode)) {
             List<? extends Element> rates = UtilXml.childElementList(rateResponseElement, "RatedShipment");
-            Map<String, BigDecimal> rateMap = new HashMap<String, BigDecimal>();
+            Map<String, BigDecimal> rateMap = new HashMap<>();
             BigDecimal firstRate = null;
             if (UtilValidate.isEmpty(rates)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
@@ -2234,17 +2234,17 @@ public class UpsServices {
         Element responseElement = UtilXml.firstChildElement(avResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
 
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
 
         if ("1".equals(responseStatusCode)) {
-            List<Map<String, String>> matches = new LinkedList<Map<String,String>>();
+            List<Map<String, String>> matches = new LinkedList<>();
 
             List<? extends Element> avResultList = UtilXml.childElementList(avResponseElement, "AddressValidationResult");
             // TODO: return error if there are no matches?
             if (UtilValidate.isNotEmpty(avResultList)) {
                 for (Element avResultElement: avResultList) {
-                    Map<String, String> match = new HashMap<String, String>();
+                    Map<String, String> match = new HashMap<>();
 
                     match.put("Rank", UtilXml.childElementValue(avResultElement, "Rank"));
                     match.put("Quality", UtilXml.childElementValue(avResultElement, "Quality"));
@@ -2571,7 +2571,7 @@ public class UpsServices {
             // handle Response element info
             Element responseElement = UtilXml.firstChildElement(shipmentConfirmResponseElement, "Response");
             String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-            List<Object> errorList = new LinkedList<Object>();
+            List<Object> errorList = new LinkedList<>();
             UpsServices.handleErrors(responseElement, errorList, locale);
             if (!"1".equals(responseStatusCode)) {
                 errorList.add(0, UtilProperties.getMessage(resourceError, "FacilityShipmentUpsShipmentConfirmFailedForReturnShippingLabel", locale));
@@ -2678,7 +2678,7 @@ public class UpsServices {
         Locale locale = (Locale) context.get("locale");
         String rateResponseString = null;
         String productStoreId = (String) context.get("productStoreId");
-        List<Map<String, Object>> shippingRates = new LinkedList<Map<String,Object>>();
+        List<Map<String, Object>> shippingRates = new LinkedList<>();
         GenericValue shipmentRouteSegment = null;
         Map<String, Object> shipmentGatewayConfig = ShipmentServices.getShipmentGatewayConfigFromShipment(delegator, shipmentId, locale);
         String shipmentGatewayConfigId = (String) shipmentGatewayConfig.get("shipmentGatewayConfigId");
@@ -2985,7 +2985,7 @@ public class UpsServices {
                 List <GenericValue> productStoreShipmentMethods = EntityQuery.use(delegator).from("ProductStoreShipmentMethView").where("productStoreId", productStoreId).queryList();
                 for (GenericValue productStoreShipmentMethod :productStoreShipmentMethods) {
                     if ("UPS".equals(productStoreShipmentMethod.get("partyId"))) {
-                        Map<String, Object> thisUpsRateCodeMap = new HashMap<String, Object>();
+                        Map<String, Object> thisUpsRateCodeMap = new HashMap<>();
                         carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
                                 .where("shipmentMethodTypeId", productStoreShipmentMethod.getString("shipmentMethodTypeId"), "partyId", productStoreShipmentMethod.getString("partyId"), "roleTypeId", productStoreShipmentMethod.getString("roleTypeId"))
                                 .queryOne();
@@ -3017,13 +3017,13 @@ public class UpsServices {
         // handle Response element info
         Element responseElement = UtilXml.firstChildElement(rateResponseElement, "Response");
         String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode");
-        List<Object> errorList = new LinkedList<Object>();
+        List<Object> errorList = new LinkedList<>();
         UpsServices.handleErrors(responseElement, errorList, locale);
         String totalRates = null;
 
         if ("1".equals(responseStatusCode)) {
             List<? extends Element> rates = UtilXml.childElementList(rateResponseElement, "RatedShipment");
-            Map<String, BigDecimal> rateMap = new HashMap<String, BigDecimal>();
+            Map<String, BigDecimal> rateMap = new HashMap<>();
             if (UtilValidate.isEmpty(rates)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsNoRateAvailable", locale));
             } else {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java Sun Apr 21 12:49:52 2019
@@ -76,7 +76,7 @@ public class UspsServices {
     public final static String module = UspsServices.class.getName();
     public final static String resourceError = "ProductUiLabels";
 
-    private static List<String> domesticCountries = new LinkedList<String>();
+    private static List<String> domesticCountries = new LinkedList<>();
     // Countries treated as domestic for rate enquiries
     static {
         domesticCountries.add("USA");
@@ -483,7 +483,7 @@ public class UspsServices {
 
         List<? extends Element> detailElementList = UtilXml.childElementList(trackInfoElement, "TrackDetail");
         if (UtilValidate.isNotEmpty(detailElementList)) {
-            List<String> trackingDetailList = new LinkedList<String>();
+            List<String> trackingDetailList = new LinkedList<>();
             for (Element detailElement: detailElementList) {
                 trackingDetailList.add(UtilXml.elementValue(detailElement));
             }

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java Sun Apr 21 12:49:52 2019
@@ -186,7 +186,7 @@ public class UspsServicesTests extends O
     public void testUspsDomesticRate() throws Exception {
 
         // prepare the context
-        Map<String, Object> context = new HashMap<String, Object>();
+        Map<String, Object> context = new HashMap<>();
 
         context.put("service", "Priority");
         context.put("originZip", "20770");

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickServices.java Sun Apr 21 12:49:52 2019
@@ -88,7 +88,7 @@ public class VerifyPickServices {
         String orderId = (String) context.get("orderId");
         try {
             shipmentId = pickSession.complete(orderId, locale);
-            Map<String, Object> shipment = new HashMap<String, Object>();
+            Map<String, Object> shipment = new HashMap<>();
             shipment.put("shipmentId", shipmentId);
             pickSession.clearAllRows();
             return shipment;

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSession.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSession.java Sun Apr 21 12:49:52 2019
@@ -66,7 +66,7 @@ public class VerifyPickSession implement
         this._delegator = _dispatcher.getDelegator();
         this.delegatorName = _delegator.getDelegatorName();
         this.userLogin = userLogin;
-        this.pickRows = new LinkedList<VerifyPickSessionRow>();
+        this.pickRows = new LinkedList<>();
     }
 
     public LocalDispatcher getDispatcher() {
@@ -90,7 +90,7 @@ public class VerifyPickSession implement
         }
 
         // get the reservations for the item
-        Map<String, Object> inventoryLookupMap = new HashMap<String, Object>();
+        Map<String, Object> inventoryLookupMap = new HashMap<>();
         inventoryLookupMap.put("orderId", orderId);
         inventoryLookupMap.put("orderItemSeqId", orderItemSeqId);
         inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
@@ -107,7 +107,7 @@ public class VerifyPickSession implement
             this.createVerifyPickRow(checkCode, reservation, orderId, orderItemSeqId, shipGroupSeqId, productId, originGeoId, quantity, locale);
         } else {
             // more than one reservation found
-            Map<GenericValue, BigDecimal> reserveQtyMap = new HashMap<GenericValue, BigDecimal>();
+            Map<GenericValue, BigDecimal> reserveQtyMap = new HashMap<>();
             BigDecimal qtyRemain = quantity;
 
             for (GenericValue reservation : reservations) {
@@ -154,7 +154,7 @@ public class VerifyPickSession implement
 
     protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity, Locale locale) throws GeneralException {
 
-        Map<String, Object> orderItemLookupMap = new HashMap<String, Object>();
+        Map<String, Object> orderItemLookupMap = new HashMap<>();
         orderItemLookupMap.put("orderId", orderId);
         orderItemLookupMap.put("productId", productId);
         orderItemLookupMap.put("statusId", "ITEM_APPROVED");
@@ -166,7 +166,7 @@ public class VerifyPickSession implement
         if (orderItems != null) {
             for (GenericValue orderItem : orderItems) {
                 // get the reservations for the item
-                Map<String, Object> inventoryLookupMap = new HashMap<String, Object>();
+                Map<String, Object> inventoryLookupMap = new HashMap<>();
                 inventoryLookupMap.put("orderId", orderId);
                 inventoryLookupMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
                 inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
@@ -256,7 +256,7 @@ public class VerifyPickSession implement
     }
 
     public List<VerifyPickSessionRow> getPickRows(String orderId) {
-        List<VerifyPickSessionRow> pickVerifyRows = new LinkedList<VerifyPickSessionRow>();
+        List<VerifyPickSessionRow> pickVerifyRows = new LinkedList<>();
         for (VerifyPickSessionRow line: this.getPickRows()) {
             if (orderId.equals(line.getOrderId())) {
                 pickVerifyRows.add(line);
@@ -311,7 +311,7 @@ public class VerifyPickSession implement
         this.updateProduct();
 
         // Update the shipment status to Picked, this will trigger createInvoicesFromShipment and finally a invoice will be created
-        Map<String, Object> updateShipmentCtx = new HashMap<String, Object>();
+        Map<String, Object> updateShipmentCtx = new HashMap<>();
         updateShipmentCtx.put("shipmentId", shipmentId);
         updateShipmentCtx.put("statusId", "SHIPMENT_PICKED");
         updateShipmentCtx.put("userLogin", this.getUserLogin());
@@ -324,7 +324,7 @@ public class VerifyPickSession implement
     }
 
     protected void checkReservedQty(String orderId, Locale locale) throws GeneralException {
-        List<String> errorList = new LinkedList<String>();
+        List<String> errorList = new LinkedList<>();
         for (VerifyPickSessionRow pickRow : this.getPickRows(orderId)) {
             BigDecimal reservedQty =  this.getReservedQty(pickRow.getOrderId(), pickRow.getOrderItemSeqId(), pickRow.getShipGroupSeqId());
             BigDecimal verifiedQty = this.getReadyToVerifyQuantity(pickRow.getOrderId(), pickRow.getOrderItemSeqId());
@@ -369,7 +369,7 @@ public class VerifyPickSession implement
     }
 
     protected void issueItemsToShipment(String shipmentId, Locale locale) throws GeneralException {
-        List<VerifyPickSessionRow> processedRows = new LinkedList<VerifyPickSessionRow>();
+        List<VerifyPickSessionRow> processedRows = new LinkedList<>();
         for (VerifyPickSessionRow pickRow : this.getPickRows()) {
             if (this.checkLine(processedRows, pickRow)) {
                 BigDecimal totalVerifiedQty = this.getVerifiedQuantity(pickRow.getOrderId(),  pickRow.getOrderItemSeqId(), pickRow.getShipGroupSeqId(), pickRow.getProductId(), pickRow.getInventoryItemId());
@@ -392,7 +392,7 @@ public class VerifyPickSession implement
     protected String createShipment(VerifyPickSessionRow line) throws GeneralException {
         Delegator delegator = this.getDelegator();
         String orderId = line.getOrderId();
-        Map<String, Object> newShipment = new HashMap<String, Object>();
+        Map<String, Object> newShipment = new HashMap<>();
         newShipment.put("originFacilityId", facilityId);
         newShipment.put("primaryShipGroupSeqId", line.getShipGroupSeqId());
         newShipment.put("primaryOrderId", orderId);
@@ -434,7 +434,7 @@ public class VerifyPickSession implement
     protected void updateProduct() throws GeneralException {
         for (VerifyPickSessionRow pickRow : this.getPickRows()) {
             if (UtilValidate.isNotEmpty(pickRow.getOriginGeoId())) {
-                Map<String, Object> updateProductCtx = new HashMap<String, Object>();
+                Map<String, Object> updateProductCtx = new HashMap<>();
                 updateProductCtx.put("originGeoId", pickRow.getOriginGeoId());
                 updateProductCtx.put("productId", pickRow.getProductId());
                 updateProductCtx.put("userLogin", this.getUserLogin());

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSessionRow.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSessionRow.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSessionRow.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/verify/VerifyPickSessionRow.java Sun Apr 21 12:49:52 2019
@@ -126,7 +126,7 @@ public class VerifyPickSessionRow implem
             quantity = this.getReadyToVerifyQty();
         }
 
-        Map<String, Object> issueOrderItemMap = new HashMap<String, Object>();
+        Map<String, Object> issueOrderItemMap = new HashMap<>();
         issueOrderItemMap.put("shipmentId", shipmentId);
         issueOrderItemMap.put("orderId", this.getOrderId());
         issueOrderItemMap.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -150,7 +150,7 @@ public class VerifyPickSessionRow implem
         if (picklistBinId != null) {
             // find the pick list item
             Delegator delegator = dispatcher.getDelegator();
-            Map<String, Object> picklistItemMap = new HashMap<String, Object>();
+            Map<String, Object> picklistItemMap = new HashMap<>();
             picklistItemMap.put("picklistBinId", picklistBinId);
             picklistItemMap.put("orderId", this.getOrderId());
             picklistItemMap.put("orderItemSeqId", this.getOrderItemSeqId());