freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: (Made FMParser constructors non-public. Though probably the whole class will be non-public anyway.)
Date Sun, 22 Jan 2017 00:07:42 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 7483146d5 -> 87fcadd9b


(Made FMParser constructors non-public. Though probably the whole class will be non-public
anyway.)


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

Branch: refs/heads/3
Commit: 87fcadd9b9d816305d97b90349cccb6deb259a91
Parents: 7483146
Author: ddekany <ddekany@apache.org>
Authored: Sun Jan 22 01:07:33 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sun Jan 22 01:07:33 2017 +0100

----------------------------------------------------------------------
 src/main/java/freemarker/core/_CoreAPI.java     |  5 +++++
 src/main/java/freemarker/template/Template.java |  2 +-
 src/main/javacc/FTL.jj                          | 14 ++------------
 3 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/87fcadd9/src/main/java/freemarker/core/_CoreAPI.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/_CoreAPI.java b/src/main/java/freemarker/core/_CoreAPI.java
index df95196..56a81b6 100644
--- a/src/main/java/freemarker/core/_CoreAPI.java
+++ b/src/main/java/freemarker/core/_CoreAPI.java
@@ -19,6 +19,7 @@
 
 package freemarker.core;
 
+import java.io.Reader;
 import java.io.Writer;
 import java.util.Collection;
 import java.util.Collections;
@@ -214,4 +215,8 @@ public class _CoreAPI {
         return te.getChild(index);
     }
     
+    public static FMParser newFMParser(Template template, Reader reader, ParserConfiguration
pCfg) {
+        return new FMParser(template, reader, pCfg);
+    }
+    
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/87fcadd9/src/main/java/freemarker/template/Template.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/Template.java b/src/main/java/freemarker/template/Template.java
index 51095e5..31149f9 100644
--- a/src/main/java/freemarker/template/Template.java
+++ b/src/main/java/freemarker/template/Template.java
@@ -247,7 +247,7 @@ public class Template extends Configurable {
             reader = ltbReader;
             
             try {
-                parser = new FMParser(this, reader, actualParserConfiguration);
+                parser = _CoreAPI.newFMParser(this, reader, actualParserConfiguration);
                 try {
                     this.rootElement = parser.Root();
                 } catch (IndexOutOfBoundsException exc) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/87fcadd9/src/main/javacc/FTL.jj
----------------------------------------------------------------------
diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj
index 077c528..2d40054 100644
--- a/src/main/javacc/FTL.jj
+++ b/src/main/javacc/FTL.jj
@@ -94,12 +94,7 @@ public class FMParser {
     private LinkedList escapes = new LinkedList();
     private int mixedContentNesting; // for stripText
 
-    /**
-     * @Deprecated This is an internal API of FreeMarker; don't call it from outside FreeMarker.
-     * 
-     * @since 2.3.24
-     */
-    public FMParser(Template template, Reader reader, ParserConfiguration pCfg) {
+    FMParser(Template template, Reader reader, ParserConfiguration pCfg) {
         this(template, true, readerToTokenManager(reader, pCfg), pCfg);
     }
 
@@ -109,12 +104,7 @@ public class FMParser {
         return new FMParserTokenManager(simpleCharStream);
     }
 
-    /**
-     * @Deprecated This is an internal API of FreeMarker; don't call it from outside FreeMarker.
-     * 
-     * @since 2.3.24
-     */
-    public FMParser(Template template, boolean newTemplate, FMParserTokenManager tkMan, ParserConfiguration
pCfg) {
+    FMParser(Template template, boolean newTemplate, FMParserTokenManager tkMan, ParserConfiguration
pCfg) {
         this(tkMan);
 
         NullArgumentException.check(pCfg);


Mime
View raw message