You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2015/04/23 01:35:46 UTC
svn commit: r1675521 - in /ofbiz/branches/OFBIZ-6275/framework:
base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
entity/src/org/ofbiz/entity/util/EntitySaxReader.java
Author: doogie
Date: Wed Apr 22 23:35:45 2015
New Revision: 1675521
URL: http://svn.apache.org/r1675521
Log:
OFBIZ-6277: 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/branches/OFBIZ-6275/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
ofbiz/branches/OFBIZ-6275/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java
Modified: ofbiz/branches/OFBIZ-6275/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-6275/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=1675521&r1=1675520&r2=1675521&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-6275/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/branches/OFBIZ-6275/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Wed Apr 22 23:35:45 2015
@@ -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/branches/OFBIZ-6275/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-6275/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java?rev=1675521&r1=1675520&r2=1675521&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-6275/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (original)
+++ ofbiz/branches/OFBIZ-6275/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java Wed Apr 22 23:35:45 2015
@@ -376,7 +376,7 @@ public class EntitySaxReader implements
Reader templateReader = new InputStreamReader(templateUrl.openStream());
StringWriter outWriter = new StringWriter();
- Configuration config = new Configuration();
+ Configuration config = FreeMarkerWorker.newConfiguration();
config.setObjectWrapper(FreeMarkerWorker.getDefaultOfbizWrapper());
config.setSetting("datetime_format", "yyyy-MM-dd HH:mm:ss.SSS");