Author: mbrohl
Date: Sat Dec 9 15:01:30 2017
New Revision: 1817619
URL:
http://svn.apache.org/viewvc?rev=1817619&view=revLog:
Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.product.feature.
(OFBIZ-9775)
Thanks Julian Leichert for reporting and providing the patch.
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/feature/ProductFeatureServices.java
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=1817619&r1=1817618&r2=1817619&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 Sat Dec 9 15:01:30 2017
@@ -60,7 +60,7 @@ public class ProductFeatureServices {
* The optional productFeatureApplTypeId causes results to be filtered by this parameter--only used in conjunction with productId.
*/
public static Map<String, Object> getProductFeaturesByType(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> results;
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
@@ -127,7 +127,7 @@ public class ProductFeatureServices {
* Result: variantProductIds: a List of productIds of variants with those features
*/
public static Map<String, Object> getAllExistingVariants(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> results;
Delegator delegator = dctx.getDelegator();
String productId = (String) context.get("productId");
@@ -179,7 +179,7 @@ public class ProductFeatureServices {
* {defaultVariantProductId: id of this variant; curProductFeatureAndAppls: features applied to this variant; existingVariantProductIds: List of productIds which are already variants with these features }
*/
public static Map<String, Object> getVariantCombinations(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> results;
LocalDispatcher dispatcher = dctx.getDispatcher();
String productId = (String) context.get("productId");