Author: mbrohl
Date: Sat Dec 9 18:00:31 2017
New Revision: 1817646
URL:
http://svn.apache.org/viewvc?rev=1817646&view=revLog:
Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.product.supplier.
(OFBIZ-9787)
Thanks Julian Leichert for reporting and providing the patch.
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java
Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java?rev=1817646&r1=1817645&r2=1817646&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java Sat Dec 9 18:00:31 2017
@@ -55,7 +55,7 @@ public class SupplierProductServices {
* filtered by date and optionally by partyId, ordered with lowest price first
*/
public static Map<String, Object> getSuppliersForProduct(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> results;
Delegator delegator = dctx.getDelegator();
GenericValue product = null;
@@ -127,7 +127,7 @@ public class SupplierProductServices {
* SupplierProduct entity for that supplier party and feature, and return it as convertedProductFeatures
*/
public static Map<String, Object> convertFeaturesForSupplier(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = new HashMap<String, Object>();
+ Map<String, Object> results;
String partyId = (String) context.get("partyId");
Collection<GenericValue> features = UtilGenerics.checkList(context.get("productFeatures"));