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:54:49 UTC
svn commit: r1639988 - in /ofbiz/branches/release12.04: ./
applications/content/src/org/ofbiz/content/content/ContentWorker.java
Author: jleroux
Date: Sun Nov 16 13:54:48 2014
New Revision: 1639988
URL: http://svn.apache.org/r1639988
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/release12.04/ (props changed)
ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/content/ContentWorker.java
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1639887
Modified: ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1639988&r1=1639987&r2=1639988&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/branches/release12.04/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Nov 16 13:54:48 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.Iterator;
import java.util.List;
import java.util.Locale;
@@ -187,8 +188,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);