freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [2/5] incubator-freemarker git commit: FREEMARKER-25 fixes forward ported from 2.3-gae
Date Thu, 01 Jun 2017 22:13:27 GMT
FREEMARKER-25 fixes forward ported from 2.3-gae


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/a3cab7af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/a3cab7af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/a3cab7af

Branch: refs/heads/3
Commit: a3cab7afed8ca502058bf11f8bcb3f6ccce34e50
Parents: 5e1570b
Author: ddekany <ddekany@apache.org>
Authored: Fri May 26 12:22:01 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Fri May 26 12:22:01 2017 +0200

----------------------------------------------------------------------
 .../apache/freemarker/core/_ObjectBuilderSettingEvaluator.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a3cab7af/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
b/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
index 6a51764..627d36a 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/_ObjectBuilderSettingEvaluator.java
@@ -45,6 +45,7 @@ import org.apache.freemarker.core.outputformat.impl.HTMLOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.PlainTextOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.RTFOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.UndefinedOutputFormat;
+import org.apache.freemarker.core.outputformat.impl.XHTMLOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.XMLOutputFormat;
 import org.apache.freemarker.core.templateresolver.AndMatcher;
 import org.apache.freemarker.core.templateresolver.ConditionalTemplateConfigurationFactory;
@@ -675,6 +676,7 @@ public class _ObjectBuilderSettingEvaluator {
             addWithSimpleName(SHORTHANDS, FirstMatchTemplateConfigurationFactory.class);
 
             addWithSimpleName(SHORTHANDS, HTMLOutputFormat.class);
+            addWithSimpleName(SHORTHANDS, XHTMLOutputFormat.class);
             addWithSimpleName(SHORTHANDS, XMLOutputFormat.class);
             addWithSimpleName(SHORTHANDS, RTFOutputFormat.class);
             addWithSimpleName(SHORTHANDS, PlainTextOutputFormat.class);
@@ -887,7 +889,7 @@ public class _ObjectBuilderSettingEvaluator {
                         cl = _ClassUtil.forName(className);
                     } catch (Exception e2) {
                         boolean failedToGetAsStaticField;
-                        if (canBeStaticField) {
+                        if (canBeStaticField && className.indexOf('.') != -1) {
                             // Try to interpret className as static filed:
                             try {
                                 return getStaticFieldValue(className);


Mime
View raw message