You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2019/08/19 15:36:52 UTC

[freemarker] branch 2.3-gae updated (c94b7ae -> c7dc43f)

This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a change to branch 2.3-gae
in repository https://gitbox.apache.org/repos/asf/freemarker.git.


    from c94b7ae  Bug fixed: In <#escape placeholder as escExpression>, the placeholder wasn't substituted inside lambda expressions inside escExpression. Fortunately it's very unlikely that anyone wanted to use lambdas there (given the few built-ins that accept lambdas).
     new 9fd27e2  Fixed outdated test
     new c7dc43f  (Some cleanup in parser literal type error checks)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/javacc/FTL.jj                                 | 18 +++++++-----------
 .../freemarker/template/DefaultObjectWrapperTest.java  |  1 +
 2 files changed, 8 insertions(+), 11 deletions(-)


[freemarker] 01/02: Fixed outdated test

Posted by dd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a commit to branch 2.3-gae
in repository https://gitbox.apache.org/repos/asf/freemarker.git

commit 9fd27e2fd1e45777d74ec06e528d5d7ce3a19dec
Author: ddekany <dd...@apache.org>
AuthorDate: Mon Aug 19 17:35:24 2019 +0200

    Fixed outdated test
---
 src/test/java/freemarker/template/DefaultObjectWrapperTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/freemarker/template/DefaultObjectWrapperTest.java b/src/test/java/freemarker/template/DefaultObjectWrapperTest.java
index 715396d..86d14bb 100644
--- a/src/test/java/freemarker/template/DefaultObjectWrapperTest.java
+++ b/src/test/java/freemarker/template/DefaultObjectWrapperTest.java
@@ -96,6 +96,7 @@ public class DefaultObjectWrapperTest {
         expected.add(Configuration.VERSION_2_3_27);
         expected.add(Configuration.VERSION_2_3_27); // no non-BC change in 2.3.28
         expected.add(Configuration.VERSION_2_3_27); // no non-BC change in 2.3.29
+        expected.add(Configuration.VERSION_2_3_27); // no non-BC change in 2.3.30
 
         List<Version> actual = new ArrayList<Version>();
         for (int i = _TemplateAPI.VERSION_INT_2_3_0; i <= Configuration.getVersion().intValue(); i++) {


[freemarker] 02/02: (Some cleanup in parser literal type error checks)

Posted by dd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a commit to branch 2.3-gae
in repository https://gitbox.apache.org/repos/asf/freemarker.git

commit c7dc43f0316daec97dff796effd37d4fbd7da59d
Author: ddekany <dd...@apache.org>
AuthorDate: Mon Aug 19 17:36:44 2019 +0200

    (Some cleanup in parser literal type error checks)
---
 src/main/javacc/FTL.jj | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj
index a12f4f1..806d16e 100644
--- a/src/main/javacc/FTL.jj
+++ b/src/main/javacc/FTL.jj
@@ -419,7 +419,7 @@ public class FMParser {
      */
     private void notBooleanLiteral(Expression exp, String expected) throws ParseException {
         if (exp instanceof BooleanLiteral) {
-            throw new ParseException("Found: " + exp.getCanonicalForm() + ". Expecting " + expected, exp);
+            throw new ParseException("Found: " + exp.getCanonicalForm() + " literal. Expecting " + expected , exp);
         }
     }
 
@@ -1893,10 +1893,10 @@ Expression EqualityExpression() :
         )
         rhs = RelationalExpression()
         {
-	        notHashLiteral(lhs, "string");
-	        notHashLiteral(rhs, "string");
-	        notListLiteral(lhs, "string");
-	        notListLiteral(rhs, "string");
+	        notHashLiteral(lhs, "different type for equality check");
+	        notHashLiteral(rhs, "different type for equality check");
+	        notListLiteral(lhs, "different type for equality check");
+	        notListLiteral(rhs, "different type for equality check");
 	        result = new ComparisonExpression(lhs, rhs, t.image);
 	        result.setLocation(template, lhs, rhs);
         }
@@ -1930,12 +1930,8 @@ Expression RelationalExpression() :
         )
         rhs = RangeExpression()
         {
-            notHashLiteral(lhs, "number");
-            notHashLiteral(rhs, "number");
-            notListLiteral(lhs, "number");
-            notListLiteral(rhs, "number");
-            notStringLiteral(lhs, "number");
-            notStringLiteral(rhs, "number");
+            numberLiteralOnly(lhs);
+            numberLiteralOnly(rhs);
             result = new ComparisonExpression(lhs, rhs, t.image);
             result.setLocation(template, lhs, rhs);
         }