struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts git commit: Uses better class resolver logic
Date Sat, 26 Aug 2017 12:26:31 GMT
Repository: struts
Updated Branches:
  refs/heads/support-2-3 ed7f9dd4c -> 2306f5f7f


Uses better class resolver logic


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/2306f5f7
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/2306f5f7
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/2306f5f7

Branch: refs/heads/support-2-3
Commit: 2306f5f7fad7f0157f216f34331238feb0539fa6
Parents: ed7f9dd
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Sat Aug 26 14:26:20 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Sat Aug 26 14:26:20 2017 +0200

----------------------------------------------------------------------
 .../org/apache/struts2/views/freemarker/FreemarkerManager.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/2306f5f7/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
index 8285821..b24d857 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
@@ -34,6 +34,7 @@ import freemarker.cache.FileTemplateLoader;
 import freemarker.cache.MultiTemplateLoader;
 import freemarker.cache.TemplateLoader;
 import freemarker.cache.WebappTemplateLoader;
+import freemarker.core.TemplateClassResolver;
 import freemarker.ext.jsp.TaglibFactory;
 import freemarker.ext.servlet.HttpRequestHashModel;
 import freemarker.ext.servlet.HttpRequestParametersHashModel;
@@ -344,6 +345,9 @@ public class FreemarkerManager {
         configuration.setLocalizedLookup(false);
         configuration.setWhitespaceStripping(true);
 
+        LOG.debug("Sets NewBuiltinClassResolver to TemplateClassResolver.SAFER_RESOLVER");
+        configuration.setNewBuiltinClassResolver(TemplateClassResolver.SAFER_RESOLVER);
+
         return configuration;
     }
 


Mime
View raw message