[velocity-engine] 01/02: Revert "[maven-release-plugin] prepare for next development iteration"

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git

commit 98fb5c96dff4d446f6a9cd650d662899e291c29d
Author: Claude Brisson 
AuthorDate: Wed Mar 3 12:44:31 2021 +0100

Revert "[maven-release-plugin] prepare for next development iteration"

This reverts commit 29f9e32167a0fe66d2f6ca6ce1d3dc394a977db8.
---
 pom.xml| 4 ++--
 spring-velocity-support/pom.xml| 2 +-
 velocity-custom-parser-example/pom.xml | 2 +-
 velocity-engine-core/pom.xml   | 2 +-
 velocity-engine-examples/pom.xml   | 2 +-
 velocity-engine-scripting/pom.xml  | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4432c60..6f10d96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
 
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 Apache Velocity
 http://velocity.apache.org/engine/devel/
@@ -222,7 +222,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 https://gitbox.apache.org/repos/asf?p=velocity-engine.git
-HEAD
+2.3-RC1
 
 
 
diff --git a/spring-velocity-support/pom.xml b/spring-velocity-support/pom.xml
index f8e3fbc..2a39811 100644
--- a/spring-velocity-support/pom.xml
+++ b/spring-velocity-support/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 spring-velocity-support
 Spring framework Velocity support
diff --git a/velocity-custom-parser-example/pom.xml 
b/velocity-custom-parser-example/pom.xml
index 72c6ab7..49f712b 100644
--- a/velocity-custom-parser-example/pom.xml
+++ b/velocity-custom-parser-example/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 
 velocity-custom-parser-example
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index bec9c9a..8dac9d0 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 
 velocity-engine-core
diff --git a/velocity-engine-examples/pom.xml b/velocity-engine-examples/pom.xml
index cff0413..cbb67f4 100644
--- a/velocity-engine-examples/pom.xml
+++ b/velocity-engine-examples/pom.xml
@@ -24,7 +24,7 @@ under the License.
 
 org.apache.velocity
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 
 velocity-engine-examples
diff --git a/velocity-engine-scripting/pom.xml 
b/velocity-engine-scripting/pom.xml
index 1c6eaf9..da39d73 100644
--- a/velocity-engine-scripting/pom.xml
+++ b/velocity-engine-scripting/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.4-SNAPSHOT
+2.3
 
 velocity-engine-scripting
 Apache Velocity - JSR 223 Scripting



[velocity-engine] 02/02: Revert "[maven-release-plugin] prepare release 2.3-RC1"

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git

commit 6f9fd2c2b0c48845287a4b9dd820ddbcc38fd176
Author: Claude Brisson 
AuthorDate: Wed Mar 3 12:45:14 2021 +0100

Revert "[maven-release-plugin] prepare release 2.3-RC1"

This reverts commit a9c3432f357b62370992d4698a2f78c97cf484cb.
---
 pom.xml| 4 ++--
 spring-velocity-support/pom.xml| 2 +-
 velocity-custom-parser-example/pom.xml | 2 +-
 velocity-engine-core/pom.xml   | 2 +-
 velocity-engine-examples/pom.xml   | 2 +-
 velocity-engine-scripting/pom.xml  | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6f10d96..924e358 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
 
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 Apache Velocity
 http://velocity.apache.org/engine/devel/
@@ -222,7 +222,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 https://gitbox.apache.org/repos/asf?p=velocity-engine.git
-2.3-RC1
+HEAD
 
 
 
diff --git a/spring-velocity-support/pom.xml b/spring-velocity-support/pom.xml
index 2a39811..1f0d112 100644
--- a/spring-velocity-support/pom.xml
+++ b/spring-velocity-support/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 spring-velocity-support
 Spring framework Velocity support
diff --git a/velocity-custom-parser-example/pom.xml 
b/velocity-custom-parser-example/pom.xml
index 49f712b..c7ea425 100644
--- a/velocity-custom-parser-example/pom.xml
+++ b/velocity-custom-parser-example/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 
 velocity-custom-parser-example
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index 8dac9d0..b31bea2 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 
 velocity-engine-core
diff --git a/velocity-engine-examples/pom.xml b/velocity-engine-examples/pom.xml
index cbb67f4..7b07c86 100644
--- a/velocity-engine-examples/pom.xml
+++ b/velocity-engine-examples/pom.xml
@@ -24,7 +24,7 @@ under the License.
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 
 velocity-engine-examples
diff --git a/velocity-engine-scripting/pom.xml 
b/velocity-engine-scripting/pom.xml
index da39d73..ca9d230 100644
--- a/velocity-engine-scripting/pom.xml
+++ b/velocity-engine-scripting/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.3-SNAPSHOT
 
 velocity-engine-scripting
 Apache Velocity - JSR 223 Scripting



[velocity-engine] branch master updated (29f9e32 -> 6f9fd2c)

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git.


from 29f9e32  [maven-release-plugin] prepare for next development iteration
 new 98fb5c9  Revert "[maven-release-plugin] prepare for next development 
iteration"
 new 6f9fd2c  Revert "[maven-release-plugin] prepare release 2.3-RC1"

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:
 pom.xml| 2 +-
 spring-velocity-support/pom.xml| 2 +-
 velocity-custom-parser-example/pom.xml | 2 +-
 velocity-engine-core/pom.xml   | 2 +-
 velocity-engine-examples/pom.xml   | 2 +-
 velocity-engine-scripting/pom.xml  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)



[velocity-engine] annotated tag 2.3-RC2 created (now b3288bf)

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a change to annotated tag 2.3-RC2
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git.


  at b3288bf  (tag)
 tagging 9cd6c031f9a2b36b6c922b9f86c3034b822e8870 (commit)
 replaces 2.3-RC1
  by Claude Brisson
  on Wed Mar 3 13:12:32 2021 +0100

- Log -
[maven-release-plugin] copy for tag 2.3-RC2
---

No new revisions were added by this update.



[velocity-engine] branch master updated: [maven-release-plugin] prepare release 2.3-RC2

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git


The following commit(s) were added to refs/heads/master by this push:
 new 9cd6c03  [maven-release-plugin] prepare release 2.3-RC2
9cd6c03 is described below

commit 9cd6c031f9a2b36b6c922b9f86c3034b822e8870
Author: Claude Brisson 
AuthorDate: Wed Mar 3 13:12:25 2021 +0100

[maven-release-plugin] prepare release 2.3-RC2
---
 pom.xml| 4 ++--
 spring-velocity-support/pom.xml| 2 +-
 velocity-custom-parser-example/pom.xml | 2 +-
 velocity-engine-core/pom.xml   | 2 +-
 velocity-engine-examples/pom.xml   | 2 +-
 velocity-engine-scripting/pom.xml  | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 924e358..edab8b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
 
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 Apache Velocity
 http://velocity.apache.org/engine/devel/
@@ -222,7 +222,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 https://gitbox.apache.org/repos/asf?p=velocity-engine.git
-HEAD
+2.3-RC2
 
 
 
diff --git a/spring-velocity-support/pom.xml b/spring-velocity-support/pom.xml
index 1f0d112..2a39811 100644
--- a/spring-velocity-support/pom.xml
+++ b/spring-velocity-support/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 spring-velocity-support
 Spring framework Velocity support
diff --git a/velocity-custom-parser-example/pom.xml 
b/velocity-custom-parser-example/pom.xml
index c7ea425..49f712b 100644
--- a/velocity-custom-parser-example/pom.xml
+++ b/velocity-custom-parser-example/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 
 velocity-custom-parser-example
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index b31bea2..8dac9d0 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 
 velocity-engine-core
diff --git a/velocity-engine-examples/pom.xml b/velocity-engine-examples/pom.xml
index 7b07c86..cbb67f4 100644
--- a/velocity-engine-examples/pom.xml
+++ b/velocity-engine-examples/pom.xml
@@ -24,7 +24,7 @@ under the License.
 
 org.apache.velocity
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 
 velocity-engine-examples
diff --git a/velocity-engine-scripting/pom.xml 
b/velocity-engine-scripting/pom.xml
index ca9d230..da39d73 100644
--- a/velocity-engine-scripting/pom.xml
+++ b/velocity-engine-scripting/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3-SNAPSHOT
+2.3
 
 velocity-engine-scripting
 Apache Velocity - JSR 223 Scripting



[velocity-engine] branch master updated: [maven-release-plugin] prepare for next development iteration

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git


The following commit(s) were added to refs/heads/master by this push:
 new 1daf166  [maven-release-plugin] prepare for next development iteration
1daf166 is described below

commit 1daf16682e6da9940ad8cbd89c36f07d5c1baad3
Author: Claude Brisson 
AuthorDate: Wed Mar 3 13:12:39 2021 +0100

[maven-release-plugin] prepare for next development iteration
---
 pom.xml| 4 ++--
 spring-velocity-support/pom.xml| 2 +-
 velocity-custom-parser-example/pom.xml | 2 +-
 velocity-engine-core/pom.xml   | 2 +-
 velocity-engine-examples/pom.xml   | 2 +-
 velocity-engine-scripting/pom.xml  | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index edab8b6..4432c60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
 
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 Apache Velocity
 http://velocity.apache.org/engine/devel/
@@ -222,7 +222,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 
scm:git:https://gitbox.apache.org/repos/asf/velocity-engine.git
 https://gitbox.apache.org/repos/asf?p=velocity-engine.git
-2.3-RC2
+HEAD
 
 
 
diff --git a/spring-velocity-support/pom.xml b/spring-velocity-support/pom.xml
index 2a39811..f8e3fbc 100644
--- a/spring-velocity-support/pom.xml
+++ b/spring-velocity-support/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 spring-velocity-support
 Spring framework Velocity support
diff --git a/velocity-custom-parser-example/pom.xml 
b/velocity-custom-parser-example/pom.xml
index 49f712b..72c6ab7 100644
--- a/velocity-custom-parser-example/pom.xml
+++ b/velocity-custom-parser-example/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 
 velocity-custom-parser-example
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index 8dac9d0..bec9c9a 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 
 velocity-engine-core
diff --git a/velocity-engine-examples/pom.xml b/velocity-engine-examples/pom.xml
index cbb67f4..cff0413 100644
--- a/velocity-engine-examples/pom.xml
+++ b/velocity-engine-examples/pom.xml
@@ -24,7 +24,7 @@ under the License.
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 
 velocity-engine-examples
diff --git a/velocity-engine-scripting/pom.xml 
b/velocity-engine-scripting/pom.xml
index da39d73..1c6eaf9 100644
--- a/velocity-engine-scripting/pom.xml
+++ b/velocity-engine-scripting/pom.xml
@@ -24,7 +24,7 @@
 
 org.apache.velocity
 velocity-engine-parent
-2.3
+2.4-SNAPSHOT
 
 velocity-engine-scripting
 Apache Velocity - JSR 223 Scripting



svn commit: r46444 - /dev/velocity/velocity-engine/2.3/

2021-03-03 Thread cbrisson
Author: cbrisson
Date: Wed Mar  3 12:25:32 2021
New Revision: 46444

Log:
Publish 2.3-RC2 in staging area

Removed:
dev/velocity/velocity-engine/2.3/original-velocity-engine-core-2.3.jar

dev/velocity/velocity-engine/2.3/original-velocity-engine-core-2.3.jar.sha256
Modified:
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.asc

dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.asc.sha256

dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.sha256
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-sources.jar
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-sources.jar.asc

dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-sources.jar.asc.sha256

dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-sources.jar.sha256
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.jar
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.jar.asc
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.jar.asc.sha256
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.jar.sha256
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.pom.asc
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3.pom.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-custom-parser-example-2.3.pom.asc

dev/velocity/velocity-engine/2.3/velocity-custom-parser-example-2.3.pom.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-javadoc.jar
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-javadoc.jar.asc

dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-javadoc.jar.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-javadoc.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-sources.jar
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-sources.jar.asc

dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-sources.jar.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3-sources.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.jar
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.jar.asc
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.jar.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.pom.asc
dev/velocity/velocity-engine/2.3/velocity-engine-core-2.3.pom.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-examples-2.3.zip
dev/velocity/velocity-engine/2.3/velocity-engine-examples-2.3.zip.asc
dev/velocity/velocity-engine/2.3/velocity-engine-examples-2.3.zip.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-javadoc.jar

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-javadoc.jar.asc

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-javadoc.jar.asc.sha256

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-javadoc.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-sources.jar

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-sources.jar.asc

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-sources.jar.asc.sha256

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3-sources.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.jar
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.jar.asc

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.jar.asc.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.jar.sha256
dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.pom.asc

dev/velocity/velocity-engine/2.3/velocity-engine-scripting-2.3.pom.asc.sha256

Modified: 
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar
==
Binary files - no diff available.

Modified: 
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.asc
==
--- 
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.asc 
(original)
+++ 
dev/velocity/velocity-engine/2.3/spring-velocity-support-2.3-javadoc.jar.asc 
Wed Mar  3 12:25:32 2021
@@ -1,11 +1,11 @@
 -BEGIN PGP SIGNATURE-
 
-iQEzBAABCgAdFiEEzkQ5wb7z2oOxgy+dvv7vInqYuAkFAmA6Mu8ACgkQvv7vInqY
-uAkoSQgAyI19+H+GGP9FY/N+sQWJ1Cob1LpcIF/wMZRMaapkrXxq4mebxqDkE3ts
-4MkjnkJcuwY2zlGsFoDpfY3KGkO0DlAel5miFgXmDDdmmLwc7HcHR8jsnhQQVaQB
-Q+NtL03WCc6I9Oa3OP/j5vOqpk6RJ9FkrRQFsoO1SnOtfrzt5SBMsPgXdS0yb5TG
-JKzoHjuq7qpzIEd1Mt5e/6dpoofN3GcwwqGzGxV7hXYSL/6+MN+cCofK7rmJG/9q

[velocity-engine] branch master updated: Fix references alternate values implementation, with some more test cases

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git


The following commit(s) were added to refs/heads/master by this push:
 new dd9b724  Fix references alternate values implementation, with some 
more test cases
dd9b724 is described below

commit dd9b7242dc690b5dc341542087904b9606fa6a71
Author: Claude Brisson 
AuthorDate: Wed Mar 3 13:07:34 2021 +0100

Fix references alternate values implementation, with some more test cases
---
 .../velocity/runtime/parser/node/ASTReference.java | 24 ++
 .../velocity/test/AlternateValuesTestCase.java | 11 ++
 .../test/StrictAlternateValuesTestCase.java| 16 +--
 3 files changed, 36 insertions(+), 15 deletions(-)

diff --git 
a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
 
b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
index 3d37c43..d4ddda9 100644
--- 
a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
+++ 
b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
@@ -308,15 +308,6 @@ public class ASTReference extends SimpleNode
 
 Object result = getRootVariableValue(context);
 
-/* a reference which has been provided an alternate value
- * is *knowingly* potentially null and should be accepted
- * in strict mode (except if the alternate value is null)
- */
-if (astAlternateValue != null && (!DuckType.asBoolean(result, 
false)))
-{
-result = astAlternateValue.value(context);
-}
-
 if (result == null && !strictRef)
 {
 /*
@@ -332,6 +323,11 @@ public class ASTReference extends SimpleNode
 rsvc.getParserConfiguration().getDollarChar() + 
rootString, null, null, uberInfo);
 }
 
+if (astAlternateValue != null && (!DuckType.asBoolean(result, 
true)))
+{
+result = astAlternateValue.value(context);
+}
+
 return result;
 }
 
@@ -370,10 +366,6 @@ public class ASTReference extends SimpleNode
 }
 previousResult = result;
 result = jjtGetChild(i).execute(result,context);
-if (astAlternateValue != null && 
(!DuckType.asBoolean(result, checkEmpty)))
-{
-result = astAlternateValue.value(context);
-}
 if (result == null && !strictRef)  // If strict and null 
then well catch this
// next time through 
the loop
 {
@@ -440,6 +432,12 @@ public class ASTReference extends SimpleNode
 }
 }
 
+// Check alternate value at the end of the evaluation
+if (astAlternateValue != null && (!DuckType.asBoolean(result, 
true)))
+{
+result = astAlternateValue.value(context);
+}
+
 return result;
 }
 catch(MethodInvocationException mie)
diff --git 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/AlternateValuesTestCase.java
 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/AlternateValuesTestCase.java
index 877b93a..a141c06 100644
--- 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/AlternateValuesTestCase.java
+++ 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/AlternateValuesTestCase.java
@@ -47,4 +47,15 @@ public class AlternateValuesTestCase extends BaseTestCase
 assertEvalEquals("<1.1>", "<${foo|1.1}>");
 }
 
+public void testComplexEval()
+{
+assertEvalEquals("", "<${date.format('medium', 
$date.date)|'no date tool'}>");
+assertEvalEquals("true", 
"#set($val=false)${val.toString().replace(\"false\", \"true\")|'so what'}");
+assertEvalEquals("so what", "#set($foo='foo')${foo.contains('bar')|'so 
what'}");
+assertEvalEquals("so what", 
"#set($val=false)${val.toString().contains('bar')|'so what'}");
+assertEvalEquals("true", 
"#set($val=false)${val.toString().contains('false')|'so what'}");
+assertEvalEquals("", "$!{null|$null}");
+assertEvalEquals("null", "$!{null|'null'}");
+assertEvalEquals("so what", "#set($spaces='   ')${spaces.trim()|'so 
what'}");
+}
 }
diff --git 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictAlternateValuesTestCase.java
 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictAlternateValuesTestCase.java
index d5c7ff4..36fe903 100644
--- 

[velocity-engine] branch master updated: Fixes failing tests on JDK 11+

2021-03-03 Thread cbrisson
This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git


The following commit(s) were added to refs/heads/master by this push:
 new 7a3fbd5  Fixes failing tests on JDK 11+
 new ba7d959  Merge pull request #20 from hgschmie/2.3-rc1-fixes
7a3fbd5 is described below

commit 7a3fbd52f480fd29f184039807c3dab2a24f050a
Author: Henning Schmiedehausen 
AuthorDate: Tue Mar 2 12:11:22 2021 -0800

Fixes failing tests on JDK 11+

Some brittle code tests the messages of exceptions etc. in the tests which 
have changed in JDK11+

Tested with OpenJDK 11 and OpenJDK 15.
---
 .../velocity/test/BuiltInEventHandlerTestCase.java | 30 +-
 .../velocity/test/issues/VelTools66TestCase.java   |  8 +-
 .../introspection/ConversionHandlerTestCase.java   | 10 
 3 files changed, 41 insertions(+), 7 deletions(-)

diff --git 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
index 63e1067..c415e47 100644
--- 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
+++ 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
@@ -472,27 +472,45 @@ public class BuiltInEventHandlerTestCase extends 
BaseTestCase {
 ve1.evaluate(context, writer, "test", "$list.get(0)");
 String result = writer.toString();
 assertTrue(result.contains("IndexOutOfBoundsException"));
-assertTrue(result.contains("Index: 0, Size: 0"));
+assertTrue(
+result.contains("Index: 0, Size: 0") // JDK8
+|| result.contains("Index 0 out of bounds for length 0") // 
JDK 11 / JDK 15
+);
 assertTrue(!result.contains("at test (line 1, column 7)"));
-assertTrue(!result.contains("rangeCheck"));
+assertFalse(
+result.contains("rangeCheck") // JDK 8
+|| result.contains("Preconditions.outOfBounds") // JDK 
11 / JDK 15
+);
 
 // exception, message and template info
 writer = new StringWriter();
 ve2.evaluate(context,writer,"test","$list.get(0)");
 result = writer.toString();
 assertTrue(result.contains("IndexOutOfBoundsException"));
-assertTrue(result.contains("Index: 0, Size: 0"));
+assertTrue(
+result.contains("Index: 0, Size: 0") // JDK8
+|| result.contains("Index 0 out of bounds for length 
0") // JDK 11 / JDK 15
+);
 assertTrue(result.contains("at test (line 1, column 7)"));
-assertTrue(!result.contains("rangeCheck"));
+assertFalse(
+result.contains("rangeCheck") // JDK 8
+|| result.contains("Preconditions.outOfBounds") // JDK 
11 / JDK 15
+);
 
 // exception, message and stack trace
 writer = new StringWriter();
 ve3.evaluate(context,writer,"test","$list.get(0)");
 result = writer.toString();
 assertTrue(result.contains("IndexOutOfBoundsException"));
-assertTrue(result.contains("Index: 0, Size: 0"));
+assertTrue(
+result.contains("Index: 0, Size: 0") // JDK8
+|| result.contains("Index 0 out of bounds for length 
0") // JDK 11 / JDK 15
+);
 assertTrue(!result.contains("at test (line 1, column 7)"));
-assertTrue(result.contains("rangeCheck"));
+assertTrue(
+result.contains("rangeCheck") // JDK 8
+|| result.contains("Preconditions.outOfBounds") // JDK 11 / 
JDK 15
+);
 
 log("PrintException handler successful.");
 
diff --git 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
index 3906f6c..529683f 100644
--- 
a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
+++ 
b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
@@ -83,7 +83,13 @@ public class VelTools66TestCase
 /* the testcase is obsolete in JDK 8, as 
SystemManager.checkMemberAccess is not anymore called
  * by Class.getMethods() */
 
-int javaVersion = 
Integer.parseInt(System.getProperty("java.version").split("\\.")[1]);
+String [] javaVersionFields = 
System.getProperty("java.version").split("\\.");
+int javaVersion = Integer.parseInt(javaVersionFields[0]);
+if (javaVersion == 1)
+{
+javaVersion = Integer.parseInt(javaVersionFields[1]);
+}
+
 if (javaVersion >= 8)
 {
 return;
diff --git