svn commit: r1631299 - in /ofbiz/trunk: .classpath LICENSE framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

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

svn commit: r1631299 - in /ofbiz/trunk: .classpath LICENSE framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

jacopoc
Author: jacopoc
Date: Mon Oct 13 06:45:42 2014
New Revision: 1631299

URL: http://svn.apache.org/r1631299
Log:
Upgraded to the latest, now official, release of Freemarker

Modified:
    ofbiz/trunk/.classpath
    ofbiz/trunk/LICENSE
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Modified: ofbiz/trunk/.classpath
URL: http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1631299&r1=1631298&r2=1631299&view=diff
==============================================================================
--- ofbiz/trunk/.classpath (original)
+++ ofbiz/trunk/.classpath Mon Oct 13 06:45:42 2014
@@ -21,7 +21,7 @@
     <classpathentry kind="lib" path="framework/base/lib/clhm-release-1.0-lru.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/hamcrest-all-1.2.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/fop-1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/freemarker-2.3.21-rc02.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/freemarker-2.3.21.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/httpclient-4.2.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/httpclient-cache-4.2.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/httpcore-4.2.1.jar"/>

Modified: ofbiz/trunk/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/trunk/LICENSE?rev=1631299&r1=1631298&r2=1631299&view=diff
==============================================================================
--- ofbiz/trunk/LICENSE (original)
+++ ofbiz/trunk/LICENSE Mon Oct 13 06:45:42 2014
@@ -18,6 +18,7 @@ framework/base/lib/avalon-framework-4.2.
 framework/base/lib/batik-all-1.7.jar
 framework/base/lib/barcode4j-2.1-barcode4j-fop-ext-complete.jar
 framework/base/lib/clhm-release-1.0-lru.jar
+framework/base/lib/freemarker-2.3.21.jar
 framework/base/lib/httpclient-4.2.1.jar
 framework/base/lib/httpclient-cache-4.2.1.jar
 framework/base/lib/httpcore-4.2.1.jar
@@ -435,7 +436,6 @@ BSD License:
 applications/content/lib/dom4j-1.6.1.jar
 framework/base/lib/antisamy-bin.1.2.jar
 framework/base/lib/bsh-engine-modified.jar
-framework/base/lib/freemarker-2.3.21-rc02.jar
 framework/base/lib/hamcrest-all-1.2.jar
 framework/base/lib/httpunit-1.7.jar
 framework/base/lib/ical4j-1.0-rc2.jar

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=1631299&r1=1631298&r2=1631299&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 Oct 13 06:45:42 2014
@@ -58,6 +58,7 @@ import freemarker.cache.TemplateLoader;
 import freemarker.core.Environment;
 import freemarker.ext.beans.BeanModel;
 import freemarker.ext.beans.BeansWrapper;
+import freemarker.ext.beans.BeansWrapperBuilder;
 import freemarker.template.Configuration;
 import freemarker.template.SimpleHash;
 import freemarker.template.SimpleScalar;
@@ -79,17 +80,13 @@ public class FreeMarkerWorker {
 
     // use soft references for this so that things from Content records don't kill all of our memory, or maybe not for performance reasons... hmmm, leave to config file...
     private static final UtilCache<String, Template> cachedTemplates = UtilCache.createUtilCache("template.ftl.general", 0, 0, false);
-    private static final BeansWrapper defaultOfbizWrapper = configureBeansWrapper(new BeansWrapper(version));
+    private static final BeansWrapper defaultOfbizWrapper = new BeansWrapperBuilder(version).build();
     private static final Configuration defaultOfbizConfig = makeConfiguration(defaultOfbizWrapper);
 
     public static BeansWrapper getDefaultOfbizWrapper() {
         return defaultOfbizWrapper;
     }
 
-    public static <T extends BeansWrapper> T configureBeansWrapper(T wrapper) {
-        return wrapper;
-    }
-
     public static Configuration makeConfiguration(BeansWrapper wrapper) {
         Configuration newConfig = new Configuration(version);
 

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=1631299&r1=1631298&r2=1631299&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java Mon Oct 13 06:45:42 2014
@@ -59,7 +59,7 @@ public class HtmlWidget extends ModelScr
     public static final String module = HtmlWidget.class.getName();
 
     private static final UtilCache<String, Template> specialTemplateCache = UtilCache.createUtilCache("widget.screen.template.ftl.general", 0, 0, false);
-    protected static Configuration specialConfig = FreeMarkerWorker.makeConfiguration(FreeMarkerWorker.configureBeansWrapper(new ExtendedWrapper(FreeMarkerWorker.version)));
+    protected static Configuration specialConfig = FreeMarkerWorker.makeConfiguration(new ExtendedWrapper(FreeMarkerWorker.version));
 
     // not sure if this is the best way to get FTL to use my fancy MapModel derivative, but should work at least...
     public static class ExtendedWrapper extends BeansWrapper {