You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/11/16 14:51:27 UTC

svn commit: r1639987 - in /ofbiz/branches/release13.07: ./ applications/content/src/org/ofbiz/content/content/ContentWorker.java

Author: jleroux
Date: Sun Nov 16 13:51:27 2014
New Revision: 1639987

URL: http://svn.apache.org/r1639987
Log:
"Applied fix from trunk for revision: 1639887" 
------------------------------------------------------------------------
r1639887 | jleroux | 2014-11-15 15:06:50 +0100 (sam. 15 nov. 2014) | 3 lignes

OFBIZ-5822 - Uses a tempTemplateContext instead of templateContext which is used later in the method, thanks to Scott's post on dev ML

I will wait to commit the last changes for the Poodle vulnerability in release branches (for running tests with Java 1.7) before backporting, because I used the "new" diamond operator here (1st in OFBiz it seems)
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1639887

Modified: ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1639987&r1=1639986&r2=1639987&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Nov 16 13:51:27 2014
@@ -23,6 +23,7 @@ import java.io.StringReader;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.sql.Timestamp;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -186,8 +187,11 @@ public class ContentWorker implements or
             ModelService service = dctx.getModelService(serviceName);
             if (service != null) {
                 //put all requestParameters into templateContext to use them as IN service parameters
-                templateContext.putAll((Map<String, Object>)templateContext.get("requestParameters"));
-                Map<String,Object> serviceCtx = service.makeValid(templateContext, ModelService.IN_PARAM);
+                Map<String,Object> tempTemplateContext = new HashMap<>();
+                @SuppressWarnings("unchecked")
+                Map<String,Object> temp = (Map<String, Object>) templateContext.get("requestParameters");
+                tempTemplateContext.putAll(temp);
+                Map<String,Object> serviceCtx = service.makeValid(tempTemplateContext, ModelService.IN_PARAM);
                 Map<String,Object> serviceRes;
                 try {
                     serviceRes = dispatcher.runSync(serviceName, serviceCtx);