freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [1/2] incubator-freemarker git commit: (Setting name converter fix)
Date Mon, 17 Jul 2017 13:16:04 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 c622e112b -> d0f34dcc1


(Setting name converter fix)


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

Branch: refs/heads/3
Commit: e5f21cf1843f790c3b71318ac09f31b0f0aabdf8
Parents: c622e11
Author: ddekany <ddekany@apache.org>
Authored: Mon Jul 17 14:26:38 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Mon Jul 17 14:26:38 2017 +0200

----------------------------------------------------------------------
 .../main/java/freemarker/core/FM2ASTToFM3SourceConverter.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/e5f21cf1/freemarker-converter/src/main/java/freemarker/core/FM2ASTToFM3SourceConverter.java
----------------------------------------------------------------------
diff --git a/freemarker-converter/src/main/java/freemarker/core/FM2ASTToFM3SourceConverter.java
b/freemarker-converter/src/main/java/freemarker/core/FM2ASTToFM3SourceConverter.java
index 9ee615e..0161cb8 100644
--- a/freemarker-converter/src/main/java/freemarker/core/FM2ASTToFM3SourceConverter.java
+++ b/freemarker-converter/src/main/java/freemarker/core/FM2ASTToFM3SourceConverter.java
@@ -23,7 +23,6 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.Reader;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -612,8 +611,11 @@ public class FM2ASTToFM3SourceConverter {
                     + "FreeMarker 3. You have to remove it manually before conversion.",
                     node.getBeginLine(), node.getBeginColumn());
         }
+        if (converted.equals("datetimeFormat")) {
+            converted = "dateTimeFormat";
+        }
 
-        if (!Arrays.asList(PropertySetting.SETTING_NAMES).contains(converted)) {
+        if (!org.apache.freemarker.core.Environment.getSettingNames().contains(converted))
{
             throw new ConverterException("Couldn't map \"" + name + "\" to a valid FreeMarker
3 setting name "
                     + "(tried: " + converted + ")");
         }


Mime
View raw message