This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new f6b35e9a550 CAMEL-19064 - Camel-Freemarker: Do not set DEFAULT_INCOMPATIBLE_IMPROVEMENTS in the Freemarker configuration f6b35e9a550 is described below commit f6b35e9a550304589d03af4d7251ed83464cc136 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Feb 16 14:58:12 2023 +0100 CAMEL-19064 - Camel-Freemarker: Do not set DEFAULT_INCOMPATIBLE_IMPROVEMENTS in the Freemarker configuration Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../java/org/apache/camel/component/freemarker/FreemarkerComponent.java | 2 +- .../java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java | 2 +- .../org/apache/camel/component/freemarker/FreemarkerEndpointTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java index 81a14e90453..d7ed57bccf8 100644 --- a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java +++ b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java @@ -87,7 +87,7 @@ public class FreemarkerComponent extends DefaultComponent { public synchronized Configuration getConfiguration() { if (configuration == null) { - configuration = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS); + configuration = new Configuration(Configuration.VERSION_2_3_32); configuration.setLocalizedLookup(isLocalizedLookup()); configuration.setTemplateLoader(new URLTemplateLoader() { @Override diff --git a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java index 9cb32e3250d..13311b584f4 100644 --- a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java +++ b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java @@ -166,7 +166,7 @@ public class FreemarkerEndpoint extends ResourceEndpoint { if (reader != null) { log.debug("Freemarker is evaluating template read from header {} using context: {}", FreemarkerConstants.FREEMARKER_TEMPLATE, dataModel); - template = new Template("temp", reader, new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS)); + template = new Template("temp", reader, new Configuration(Configuration.VERSION_2_3_32)); } else { log.debug("Freemarker is evaluating {} using context: {}", path, dataModel); if (getEncoding() != null) { diff --git a/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerEndpointTest.java b/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerEndpointTest.java index ae6720c0741..0f58c755563 100644 --- a/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerEndpointTest.java +++ b/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerEndpointTest.java @@ -36,7 +36,7 @@ public class FreemarkerEndpointTest extends FreemarkerTest { endpoint.setAllowContextMapAll(true); endpoint.setResourceUri("org/apache/camel/component/freemarker/example.ftl"); - Configuration configuration = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS); + Configuration configuration = new Configuration(Configuration.VERSION_2_3_32); configuration.setTemplateLoader(new ClassTemplateLoader(Resource.class, "/")); endpoint.setConfiguration(configuration);