You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2016/02/20 13:01:24 UTC
svn commit: r1731380 - in /ofbiz/trunk/framework:
base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
entity/src/org/ofbiz/entity/util/EntitySaxReader.java
Author: deepak
Date: Sat Feb 20 12:01:23 2016
New Revision: 1731380
URL: http://svn.apache.org/viewvc?rev=1731380&view=rev
Log:
OFBIZ-6277: Merge changes from r1675521 to Trunk:
Log:
============================================================
new Configuration() is deprecated; instead, the desired
freemarker version should be passed in. To make it easier to control
the version centrally, add a helper method on FreeMarkerWorker that
wraps the instantiation of the Configuration object.
============================================================
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.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=1731380&r1=1731379&r2=1731380&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 Sat Feb 20 12:01:23 2016
@@ -88,8 +88,12 @@ public class FreeMarkerWorker {
return defaultOfbizWrapper;
}
+ public static Configuration newConfiguration() {
+ return new Configuration(version);
+ }
+
public static Configuration makeConfiguration(BeansWrapper wrapper) {
- Configuration newConfig = new Configuration(version);
+ Configuration newConfig = newConfiguration();
newConfig.setObjectWrapper(wrapper);
TemplateHashModel staticModels = wrapper.getStaticModels();
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java?rev=1731380&r1=1731379&r2=1731380&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java Sat Feb 20 12:01:23 2016
@@ -376,7 +376,7 @@ public class EntitySaxReader implements
Reader templateReader = new InputStreamReader(templateUrl.openStream());
StringWriter outWriter = new StringWriter();
- Configuration config = new Configuration(FreeMarkerWorker.version);
+ Configuration config = FreeMarkerWorker.newConfiguration();
config.setObjectWrapper(FreeMarkerWorker.getDefaultOfbizWrapper());
config.setSetting("datetime_format", "yyyy-MM-dd HH:mm:ss.SSS");