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 2013/04/20 13:12:35 UTC
svn commit: r1470154 - in /ofbiz/branches/release12.04: ./
framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java
Author: jleroux
Date: Sat Apr 20 11:12:35 2013
New Revision: 1470154
URL: http://svn.apache.org/r1470154
Log:
"Applied fix from trunk for revision: 1470151"
------------------------------------------------------------------------
r1470151 | jleroux | 2013-04-20 12:57:34 +0200 (sam., 20 avr. 2013) | 14 lines
A patch from Nicolas Malin for "merge three maps with map-to-map" https://issues.apache.org/jira/browse/OFBIZ-5152
To merge two or more maps on one map with <map-to-map> element on mini-lang doesn't work.
example :
<call-service service-name="accReport-header" in-map-name="headerMap">
<result-to-field result-name="jrParameters" />
</call-service>
<map-to-map map="reportParameters" to-map="jrParameters"/>
<map-to-map map="parameters" to-map="jrParameters"/>
This doesn't work because the map-to-map method doesn't accept to merge an existing to-map and the <map-to-map map="parameters" to-map="jrParameters"/> has been ignored
The patch move the map merge function to run it when a map is given.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release12.04/ (props changed)
ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1470151
Modified: ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java?rev=1470154&r1=1470153&r2=1470154&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java (original)
+++ ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/MapToMap.java Sat Apr 20 11:12:35 2013
@@ -61,8 +61,8 @@ public final class MapToMap extends Meth
if (toMap == null) {
toMap = FastMap.newInstance();
toMapFma.put(methodContext.getEnvMap(), toMap);
- toMap.putAll(fromMap);
}
+ toMap.putAll(fromMap);
} else {
methodContext.putAllEnv(fromMap);
}