svn commit: r956470 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java

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

svn commit: r956470 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java

doogie-3
Author: doogie
Date: Mon Jun 21 07:09:02 2010
New Revision: 956470

URL: http://svn.apache.org/viewvc?rev=956470&view=rev
Log:
Make use of makeMapWritable and makeListWritable to copy the list and
map.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=956470&r1=956469&r2=956470&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Mon Jun 21 07:09:02 2010
@@ -497,13 +497,9 @@ public class FreeMarkerWorker {
             String key = entry.getKey();
             Object o = entry.getValue();
             if (o instanceof Map) {
-                Map<Object, Object> map = FastMap.newInstance();
-                map.putAll(UtilGenerics.checkMap(o));
-                context.put(key, map);
+                context.put(key, UtilMisc.makeMapWritable(UtilGenerics.checkMap(o)));
             } else if (o instanceof List) {
-                List<Object> list = new ArrayList<Object>();
-                list.addAll(UtilGenerics.checkList(o));
-                context.put(key, list);
+                context.put(key, UtilMisc.makeListWritable(UtilGenerics.checkList(o)));
             } else {
                 context.put(key, o);
             }