You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Claude Brisson <cl...@renegat.net.INVALID> on 2019/12/16 23:53:44 UTC

[ANNOUNCE] Velocity Engine 2.2 RC2 test build available

The test build of Velocity Engine 2.2 RC2 is available.

No determination as to the quality ('alpha,' 'beta,' or 'GA') of 
Velocity Engine 2.1 RC3 has been made, and at this time it is simply a 
"test build". We welcome any comments you may have, and will take all 
feedback into account if a quality vote is called for this build.

Release notes:

* 
https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/release-notes.html

Distribution:

  * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/

Maven 2 staging repository:

  * 
https://repository.apache.org/content/repositories/orgapachevelocity-1030/

Documentation:

* https://velocity.apache.org/engine/2.2/

Sources:

  * https://svn.apache.org/repos/asf/velocity/engine/tags/2.2/

Release Candidates History:

  * RC1 Initial RC
  * RC2
  - added BigInteger and BigDecimal implicit conversions
  - [VELOCITY-923] fixed a parser regression for `$foo||`
  - [VELOCITY-904] fixed two corner case bugs for the 
velocimacro.arguments.preserve_literals backward compatibility flag
  - fixed engine and dependency versions in README and mention the 
parser customization feature in the *building* section
  - nicified README links
  - upgraded surfire plugin version from 2.19.1 to 2.22.1
  - upgraded maven-jar-plugin from 3.1.1 to 3.2.2
  - added version 1.2 for extra-enforcer-rules
  - upgraded maven-javadoc-plugin from 3.1.0 to 3.1.1
  - upgraded findbugs-maven-plugin from 3.0.4 to 3.0.5
  - upgraded maven-release-plugin from *unspecified* to 3.0.0-M1
  - added a new templatized static class 
org.apache.velocity.runtime.VelocityEngineVersion.java
  - use the File Separator control character to mark the end of stream 
for the parser (instead of the zero-width space char)
  - reviewed packaging of engine examples (refreshed content, plus made 
them as a standalone zip file with readme, shell scripts, dependencies 
and examples sources rather than a meaningless standalone pom next to a 
jar without explanations...)


   --
   Claude



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [ANNOUNCE] Velocity Engine 2.2 RC2 test build available

Posted by Thomas Mortagne <th...@xwiki.com>.
I also get a similar nullpointer when passing a boolean as parameter
to a macro as in:

"""
#macro(testMacro $param)
$param
#end

#testMacro(true)
"""

produces

org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content
with namespace [mytemplaye]
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:279)
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:244)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:91)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:84)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:79)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.testMacroWithBooleanParameter(DefaultVelocityEngineTest.java:213)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74)
    at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
    at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
    Suppressed: java.lang.AssertionError: Following messages must be
asserted: [Exception in macro #testMacro called at mytemplaye[line 1,
column 36]
]
        at org.xwiki.test.junit5.LogCaptureExtension.uninitializeLogger(LogCaptureExtension.java:192)
        at org.xwiki.test.junit5.LogCaptureExtension.afterEach(LogCaptureExtension.java:98)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachCallbacks$11(TestMethodTestDescriptor.java:245)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:256)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:256)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:255)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachCallbacks(TestMethodTestDescriptor.java:244)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:141)
        ... 43 more
Caused by: java.lang.NullPointerException
    at org.apache.velocity.runtime.parser.node.NodeUtils.tokenLiteral(NodeUtils.java:133)
    at org.apache.velocity.runtime.parser.node.SimpleNode.literal(SimpleNode.java:355)
    at org.apache.velocity.runtime.directive.VelocimacroProxy.handleArgValues(VelocimacroProxy.java:413)
    at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:208)
    at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:328)
    at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:258)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
    at org.apache.velocity.Template.merge(Template.java:358)
    at org.apache.velocity.Template.merge(Template.java:262)
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:271)
    ... 70 more

On Tue, Dec 17, 2019 at 12:04 PM Thomas Mortagne
<th...@xwiki.com> wrote:
>
> Just found a (a priori recent) regression in the latest SNAPSHOT
> (tested also in the deployed RC2) with
> "velocimacro.arguments.preserve_literals" and a missing parameter when
> calling a macro:
>
> """
> #macro(testMacro $param)
> #end
>
> #testMacro()
> """
>
> produces the following exception
>
> org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content
> with namespace [mytemplaye]
>     at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:279)
>     at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:244)
>     at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:91)
>     at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:84)
>     at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:79)
>     at org.xwiki.velocity.internal.DefaultVelocityEngineTest.testMacroMissingParameter(DefaultVelocityEngineTest.java:205)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
>     at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
>     at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
>     at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
>     at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124)
>     at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74)
>     at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
>     at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
>     at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
>     at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
>     at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
>     at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
>     at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
>     at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
>     at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
>     at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
>     at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
>     at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
>     at java.util.ArrayList.forEach(ArrayList.java:1257)
>     at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
>     at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
>     at java.util.ArrayList.forEach(ArrayList.java:1257)
>     at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
>     at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
>     at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
>     at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
>     at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
>     at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
>     at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
>     at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
>     at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
>     at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
>     at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
>     at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
>     at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
>     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
>     Suppressed: java.lang.AssertionError: Following messages must be
> asserted: [Exception in macro #testMacro called at mytemplaye[line 1,
> column 30]
> ]
>         at org.xwiki.test.junit5.LogCaptureExtension.uninitializeLogger(LogCaptureExtension.java:192)
>         at org.xwiki.test.junit5.LogCaptureExtension.afterEach(LogCaptureExtension.java:98)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachCallbacks$11(TestMethodTestDescriptor.java:245)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:256)
>         at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:256)
>         at java.util.ArrayList.forEach(ArrayList.java:1257)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:255)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachCallbacks(TestMethodTestDescriptor.java:244)
>         at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:141)
>         ... 43 more
> Caused by: java.lang.NullPointerException
>     at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:269)
>     at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:328)
>     at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:258)
>     at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
>     at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
>     at org.apache.velocity.Template.merge(Template.java:358)
>     at org.apache.velocity.Template.merge(Template.java:262)
>     at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:271)
>     ... 70 more
>
> On Tue, Dec 17, 2019 at 12:54 AM Claude Brisson
> <cl...@renegat.net.invalid> wrote:
> >
> > The test build of Velocity Engine 2.2 RC2 is available.
> >
> > No determination as to the quality ('alpha,' 'beta,' or 'GA') of
> > Velocity Engine 2.1 RC3 has been made, and at this time it is simply a
> > "test build". We welcome any comments you may have, and will take all
> > feedback into account if a quality vote is called for this build.
> >
> > Release notes:
> >
> > *
> > https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/release-notes.html
> >
> > Distribution:
> >
> >   * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/
> >
> > Maven 2 staging repository:
> >
> >   *
> > https://repository.apache.org/content/repositories/orgapachevelocity-1030/
> >
> > Documentation:
> >
> > * https://velocity.apache.org/engine/2.2/
> >
> > Sources:
> >
> >   * https://svn.apache.org/repos/asf/velocity/engine/tags/2.2/
> >
> > Release Candidates History:
> >
> >   * RC1 Initial RC
> >   * RC2
> >   - added BigInteger and BigDecimal implicit conversions
> >   - [VELOCITY-923] fixed a parser regression for `$foo||`
> >   - [VELOCITY-904] fixed two corner case bugs for the
> > velocimacro.arguments.preserve_literals backward compatibility flag
> >   - fixed engine and dependency versions in README and mention the
> > parser customization feature in the *building* section
> >   - nicified README links
> >   - upgraded surfire plugin version from 2.19.1 to 2.22.1
> >   - upgraded maven-jar-plugin from 3.1.1 to 3.2.2
> >   - added version 1.2 for extra-enforcer-rules
> >   - upgraded maven-javadoc-plugin from 3.1.0 to 3.1.1
> >   - upgraded findbugs-maven-plugin from 3.0.4 to 3.0.5
> >   - upgraded maven-release-plugin from *unspecified* to 3.0.0-M1
> >   - added a new templatized static class
> > org.apache.velocity.runtime.VelocityEngineVersion.java
> >   - use the File Separator control character to mark the end of stream
> > for the parser (instead of the zero-width space char)
> >   - reviewed packaging of engine examples (refreshed content, plus made
> > them as a standalone zip file with readme, shell scripts, dependencies
> > and examples sources rather than a meaningless standalone pom next to a
> > jar without explanations...)
> >
> >
> >    --
> >    Claude
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> > For additional commands, e-mail: dev-help@velocity.apache.org
> >
>
>
> --
> Thomas Mortagne



-- 
Thomas Mortagne

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [ANNOUNCE] Velocity Engine 2.2 RC2 test build available

Posted by Thomas Mortagne <th...@xwiki.com>.
Just found a (a priori recent) regression in the latest SNAPSHOT
(tested also in the deployed RC2) with
"velocimacro.arguments.preserve_literals" and a missing parameter when
calling a macro:

"""
#macro(testMacro $param)
#end

#testMacro()
"""

produces the following exception

org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content
with namespace [mytemplaye]
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:279)
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:244)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:91)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:84)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.assertEvaluate(DefaultVelocityEngineTest.java:79)
    at org.xwiki.velocity.internal.DefaultVelocityEngineTest.testMacroMissingParameter(DefaultVelocityEngineTest.java:205)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74)
    at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
    at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
    Suppressed: java.lang.AssertionError: Following messages must be
asserted: [Exception in macro #testMacro called at mytemplaye[line 1,
column 30]
]
        at org.xwiki.test.junit5.LogCaptureExtension.uninitializeLogger(LogCaptureExtension.java:192)
        at org.xwiki.test.junit5.LogCaptureExtension.afterEach(LogCaptureExtension.java:98)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachCallbacks$11(TestMethodTestDescriptor.java:245)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:256)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:256)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:255)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachCallbacks(TestMethodTestDescriptor.java:244)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:141)
        ... 43 more
Caused by: java.lang.NullPointerException
    at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:269)
    at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:328)
    at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:258)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
    at org.apache.velocity.Template.merge(Template.java:358)
    at org.apache.velocity.Template.merge(Template.java:262)
    at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:271)
    ... 70 more

On Tue, Dec 17, 2019 at 12:54 AM Claude Brisson
<cl...@renegat.net.invalid> wrote:
>
> The test build of Velocity Engine 2.2 RC2 is available.
>
> No determination as to the quality ('alpha,' 'beta,' or 'GA') of
> Velocity Engine 2.1 RC3 has been made, and at this time it is simply a
> "test build". We welcome any comments you may have, and will take all
> feedback into account if a quality vote is called for this build.
>
> Release notes:
>
> *
> https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/release-notes.html
>
> Distribution:
>
>   * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/
>
> Maven 2 staging repository:
>
>   *
> https://repository.apache.org/content/repositories/orgapachevelocity-1030/
>
> Documentation:
>
> * https://velocity.apache.org/engine/2.2/
>
> Sources:
>
>   * https://svn.apache.org/repos/asf/velocity/engine/tags/2.2/
>
> Release Candidates History:
>
>   * RC1 Initial RC
>   * RC2
>   - added BigInteger and BigDecimal implicit conversions
>   - [VELOCITY-923] fixed a parser regression for `$foo||`
>   - [VELOCITY-904] fixed two corner case bugs for the
> velocimacro.arguments.preserve_literals backward compatibility flag
>   - fixed engine and dependency versions in README and mention the
> parser customization feature in the *building* section
>   - nicified README links
>   - upgraded surfire plugin version from 2.19.1 to 2.22.1
>   - upgraded maven-jar-plugin from 3.1.1 to 3.2.2
>   - added version 1.2 for extra-enforcer-rules
>   - upgraded maven-javadoc-plugin from 3.1.0 to 3.1.1
>   - upgraded findbugs-maven-plugin from 3.0.4 to 3.0.5
>   - upgraded maven-release-plugin from *unspecified* to 3.0.0-M1
>   - added a new templatized static class
> org.apache.velocity.runtime.VelocityEngineVersion.java
>   - use the File Separator control character to mark the end of stream
> for the parser (instead of the zero-width space char)
>   - reviewed packaging of engine examples (refreshed content, plus made
> them as a standalone zip file with readme, shell scripts, dependencies
> and examples sources rather than a meaningless standalone pom next to a
> jar without explanations...)
>
>
>    --
>    Claude
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>


-- 
Thomas Mortagne

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org