Author: adrianc
Date: Thu Oct 30 11:24:45 2014
New Revision: 1635467

URL: http://svn.apache.org/r1635467
Log:
Fix NPE, don't create unused object.

Modified:
    
ofbiz/branches/json-integration-refactoring/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java

Modified: 
ofbiz/branches/json-integration-refactoring/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/json-integration-refactoring/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java?rev=1635467&r1=1635466&r2=1635467&view=diff
==============================================================================
--- 
ofbiz/branches/json-integration-refactoring/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
 (original)
+++ 
ofbiz/branches/json-integration-refactoring/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
 Thu Oct 30 11:24:45 2014
@@ -235,14 +235,15 @@ public class ServiceEventHandler impleme
 
         Map<String, Object> rawParametersMap = 
UtilHttp.getParameterMap(request, null, null);
         Set<String> urlOnlyParameterNames = 
UtilHttp.getUrlOnlyParameterMap(request).keySet();
-        Map<String, Object> requestBodyMap;
+        Map<String, Object> requestBodyMap = null;
         try {
             requestBodyMap = 
RequestBodyMapHandlerFactory.extractMapFromRequestBody(request);
         } catch (IOException ioe) {
             Debug.logWarning(ioe, module);
-            requestBodyMap = new HashMap<String, Object>();
         }
-        rawParametersMap.putAll(requestBodyMap);
+        if (requestBodyMap != null) {
+            rawParametersMap.putAll(requestBodyMap);
+        }
 
         // we have a service and the model; build the context
         Map<String, Object> serviceContext = FastMap.newInstance();


Reply via email to