svn commit: r1811428 - /ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java

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

svn commit: r1811428 - /ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java

mbrohl
Author: mbrohl
Date: Sat Oct  7 14:12:51 2017
New Revision: 1811428

URL: http://svn.apache.org/viewvc?rev=1811428&view=rev
Log:
Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.uom.
(OFBIZ-9634)

Thanks Dennis Balkir for reporting and providing the patch.

Modified:
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java?rev=1811428&r1=1811427&r2=1811428&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java Sat Oct  7 14:12:51 2017
@@ -99,12 +99,12 @@ public class UomWorker {
         if (originalValue == null || uomId == null || uomIdTo == null) return null;
         if (uomId.equals(uomIdTo)) return originalValue;
 
-        Map<String, Object> svcInMap =  new LinkedHashMap<String, Object>();
+        Map<String, Object> svcInMap =  new LinkedHashMap<>();
         svcInMap.put("originalValue", originalValue);
         svcInMap.put("uomId", uomId);
         svcInMap.put("uomIdTo", uomIdTo);
 
-        Map<String, Object> svcOutMap =  new LinkedHashMap<String, Object>();
+        Map<String, Object> svcOutMap;
         try {
             svcOutMap = dispatcher.runSync("convertUom", svcInMap);
         } catch (GenericServiceException ex) {