From commits-return-3948-archive-asf-public=cust-asf.ponee.io@velocity.apache.org Fri Jan 24 09:56:38 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0AE4718064E for ; Fri, 24 Jan 2020 10:56:37 +0100 (CET) Received: (qmail 60727 invoked by uid 500); 24 Jan 2020 09:56:37 -0000 Mailing-List: contact commits-help@velocity.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@velocity.apache.org Delivered-To: mailing list commits@velocity.apache.org Received: (qmail 60718 invoked by uid 99); 24 Jan 2020 09:56:37 -0000 Received: from Unknown (HELO svn01-us-east.apache.org) (13.90.137.153) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2020 09:56:37 +0000 Received: from svn01-us-east.apache.org (svn01-us-east.apache.org [127.0.0.1]) by svn01-us-east.apache.org (ASF Mail Server at svn01-us-east.apache.org) with ESMTP id 38A6017A14D for ; Fri, 24 Jan 2020 09:56:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1873097 - in /velocity/site/production/engine: 2.0/ 2.1/ 2.2/ devel/ Date: Fri, 24 Jan 2020 09:56:36 -0000 To: commits@velocity.apache.org From: cbrisson@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20200124095637.38A6017A14D@svn01-us-east.apache.org> Author: cbrisson Date: Fri Jan 24 09:56:36 2020 New Revision: 1873097 URL: http://svn.apache.org/viewvc?rev=1873097&view=rev Log: [site/engine][prod] Push all previous changes to production Modified: velocity/site/production/engine/2.0/upgrading.html velocity/site/production/engine/2.0/user-guide.html velocity/site/production/engine/2.1/changes.html velocity/site/production/engine/2.1/upgrading.html velocity/site/production/engine/2.1/user-guide.html velocity/site/production/engine/2.2/changes.html velocity/site/production/engine/2.2/dependencies.html velocity/site/production/engine/2.2/upgrading.html velocity/site/production/engine/2.2/user-guide.html velocity/site/production/engine/devel/changes.html velocity/site/production/engine/devel/dependencies.html velocity/site/production/engine/devel/upgrading.html velocity/site/production/engine/devel/user-guide.html Modified: velocity/site/production/engine/2.0/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/upgrading.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.0/upgrading.html (original) +++ velocity/site/production/engine/2.0/upgrading.html Fri Jan 24 09:56:36 2020 @@ -268,9 +268,11 @@ directive.if.emptycheck = false
  • method arguments can be arithmetic expressions
  • method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property runtime.conversion.handler = none.
  • space gobbling (to control the indentation of generated code) is now configurable via the space.gobbing configuration key, which can take the following values: none, bc (aka. backward compatible), lines and structured. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to bc.
  • -
  • The #foreach predefined references $velocityCount and $velocityHasNext have been removed. Use $foreach.count (1-based), $foreach.index (0-based) and foreach.hasNext().
  • +
  • the #foreach predefined references $velocityCount and $velocityHasNext have been removed. Use $foreach.count (1-based), $foreach.index (0-based) and foreach.hasNext().
  • +
  • Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
  • +
  • Velocimacros do not anymore have a proxy context of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
  • -

    Dependency changes:

    +

    Dependency Changes

    • Velocity now requires a JDK version of 1.7 or higher.
    • commons-collections and commons-logging aren't needed any more at runtime.
    • Modified: velocity/site/production/engine/2.0/user-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/user-guide.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.0/user-guide.html (original) +++ velocity/site/production/engine/2.0/user-guide.html Fri Jan 24 09:56:36 2020 @@ -1016,7 +1016,7 @@ $foo
    • boolean value true
    • boolean value false
    -

    When passing references as arguments to Velocimacros, please note that references are passed 'by name'. This means that their value is 'generated' at each use inside the Velocimacro. This feature allows you to pass references with method calls and have the method called at each use. For example, when calling the following Velocimacro as shown

    +

    Since 2.0, Velocimacros arguments are passed by value (or, more precisely, the result of their evaluation is passed by reference). This means that they are evaluated only once, even when used several times inside the macro. It means that in the following example:

    #macro( callme $a )
         $a $a $a
     #end
    @@ -1025,14 +1025,7 @@ $foo
     
    -

    results in the method bar() of the reference $foo being called 3 times.

    -

    At first glance, this feature appears surprising, but when you take into consideration the original motivation behind Velocimacros -- to eliminate cut'n'paste duplication of commonly used VTL -- it makes sense. It allows you to do things like pass stateful objects, such as an object that generates colors in a repeating sequence for coloring table rows, into the Velocimacro.

    -

    If you need to circumvent this feature, you can always just get the value from the method as a new reference and pass that :

    -
    #set( $myval = $foo.bar() )
    -#callme( $myval )
    -
    - - +

    the method bar() of the reference $foo is only called once.

    Velocimacro Properties

    Several lines in the velocity.properties file allow for flexible implementation of Velocimacros. Note that these are also documented in the Developer Guide.

    velocimacro.library - A comma-separated list of all Velocimacro template libraries. By default, Velocity looks for a single library: VM_global_library.vm. The configured template path is used to find the Velocimacro libraries.

    Modified: velocity/site/production/engine/2.1/changes.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.1/changes.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.1/changes.html (original) +++ velocity/site/production/engine/2.1/changes.html Fri Jan 24 09:56:36 2020 @@ -325,6 +325,34 @@ h2:hover > .headerlink, h3:hover > .head + + + Fixed regression: Macro arguments names cannot collide with external references names . Fixes VELOCITY-926. + cbrisson + + + + + + Fixed macro calls without parenthesis eating the following newline in BC mode . Fixes VELOCITY-925. + cbrisson + + + + + + Fixed bad cache handling for java.lang.Class methods . Fixes VELOCITY-924. + cbrisson + + + + + + Fixed parser regression when || follow a Velocity expression . Fixes VELOCITY-923. + cbrisson + + + Added BigInteger and BigDecimal implicit conversions . Modified: velocity/site/production/engine/2.1/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.1/upgrading.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.1/upgrading.html (original) +++ velocity/site/production/engine/2.1/upgrading.html Fri Jan 24 09:56:36 2020 @@ -335,6 +335,8 @@ Please note that the maven repository pa
  • method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property runtime.conversion.handler.class = none.
  • space gobbling (to control the indentation of generated code) is now configurable via the space.gobbing configuration key, which can take the following values: none, bc (aka. backward compatible), lines and structured. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to bc.
  • the #foreach predefined references $velocityCount and $velocityHasNext have been removed. Use $foreach.count (1-based), $foreach.index (0-based) and foreach.hasNext().
  • +
  • Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
  • +
  • Velocimacros do not anymore have a proxy context of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
  • Dependency Changes

      Modified: velocity/site/production/engine/2.1/user-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.1/user-guide.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.1/user-guide.html (original) +++ velocity/site/production/engine/2.1/user-guide.html Fri Jan 24 09:56:36 2020 @@ -1026,7 +1026,7 @@ $foo
    • boolean value true
    • boolean value false
    -

    When passing references as arguments to Velocimacros, please note that references are passed 'by name'. This means that their value is 'generated' at each use inside the Velocimacro. This feature allows you to pass references with method calls and have the method called at each use. For example, when calling the following Velocimacro as shown

    +

    Since 2.0, Velocimacros arguments are passed by value (or, more precisely, the result of their evaluation is passed by reference). This means that they are evaluated only once, even when used several times inside the macro. It means that in the following example:

    #macro( callme $a )
         $a $a $a
     #end
    @@ -1035,14 +1035,7 @@ $foo
     
    -

    results in the method bar() of the reference $foo being called 3 times.

    -

    At first glance, this feature appears surprising, but when you take into consideration the original motivation behind Velocimacros -- to eliminate cut'n'paste duplication of commonly used VTL -- it makes sense. It allows you to do things like pass stateful objects, such as an object that generates colors in a repeating sequence for coloring table rows, into the Velocimacro.

    -

    If you need to circumvent this feature, you can always just get the value from the method as a new reference and pass that :

    -
    #set( $myval = $foo.bar() )
    -#callme( $myval )
    -
    - - +

    the method bar() of the reference $foo is only called once.

    Velocimacro Properties

    Several lines in the velocity.properties file allow for flexible implementation of Velocimacros. Note that these are also documented in the Developer Guide.

    velocimacro.library.path - A comma-separated list of all Velocimacro template libraries. By default, Velocity looks for a single library: velocimacros.vtl (since 2.1 ; and if not found it will also look at the old default VM_global_library.vm). The configured template path is used to find the Velocimacro libraries.

    Modified: velocity/site/production/engine/2.2/changes.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.2/changes.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.2/changes.html (original) +++ velocity/site/production/engine/2.2/changes.html Fri Jan 24 09:56:36 2020 @@ -325,6 +325,34 @@ h2:hover > .headerlink, h3:hover > .head + + + Fixed regression: Macro arguments names cannot collide with external references names . Fixes VELOCITY-926. + cbrisson + + + + + + Fixed macro calls without parenthesis eating the following newline in BC mode . Fixes VELOCITY-925. + cbrisson + + + + + + Fixed bad cache handling for java.lang.Class methods . Fixes VELOCITY-924. + cbrisson + + + + + + Fixed parser regression when || follow a Velocity expression . Fixes VELOCITY-923. + cbrisson + + + Added BigInteger and BigDecimal implicit conversions . Modified: velocity/site/production/engine/2.2/dependencies.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.2/dependencies.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.2/dependencies.html (original) +++ velocity/site/production/engine/2.2/dependencies.html Fri Jan 24 09:56:36 2020 @@ -257,7 +257,7 @@ h2:hover > .headerlink, h3:hover > .head junit -4.12 +4.13 No Yes No Modified: velocity/site/production/engine/2.2/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.2/upgrading.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.2/upgrading.html (original) +++ velocity/site/production/engine/2.2/upgrading.html Fri Jan 24 09:56:36 2020 @@ -386,6 +386,8 @@ Please note that the maven repository pa
  • method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property runtime.conversion.handler.class = none.
  • space gobbling (to control the indentation of generated code) is now configurable via the space.gobbing configuration key, which can take the following values: none, bc (aka. backward compatible), lines and structured. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to bc.
  • the #foreach predefined references $velocityCount and $velocityHasNext have been removed. Use $foreach.count (1-based), $foreach.index (0-based) and foreach.hasNext().
  • +
  • Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
  • +
  • Velocimacros do not anymore have a proxy context of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
  • Dependency Changes

      Modified: velocity/site/production/engine/2.2/user-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.2/user-guide.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/2.2/user-guide.html (original) +++ velocity/site/production/engine/2.2/user-guide.html Fri Jan 24 09:56:36 2020 @@ -1026,7 +1026,7 @@ $foo
    • boolean value true
    • boolean value false
    -

    When passing references as arguments to Velocimacros, please note that references are passed 'by name'. This means that their value is 'generated' at each use inside the Velocimacro. This feature allows you to pass references with method calls and have the method called at each use. For example, when calling the following Velocimacro as shown

    +

    Since 2.0, Velocimacros arguments are passed by value (or, more precisely, the result of their evaluation is passed by reference). This means that they are evaluated only once, even when used several times inside the macro. It means that in the following example:

    #macro( callme $a )
         $a $a $a
     #end
    @@ -1035,14 +1035,7 @@ $foo
     
    -

    results in the method bar() of the reference $foo being called 3 times.

    -

    At first glance, this feature appears surprising, but when you take into consideration the original motivation behind Velocimacros -- to eliminate cut'n'paste duplication of commonly used VTL -- it makes sense. It allows you to do things like pass stateful objects, such as an object that generates colors in a repeating sequence for coloring table rows, into the Velocimacro.

    -

    If you need to circumvent this feature, you can always just get the value from the method as a new reference and pass that :

    -
    #set( $myval = $foo.bar() )
    -#callme( $myval )
    -
    - - +

    the method bar() of the reference $foo is only called once.

    Velocimacro Properties

    Several lines in the velocity.properties file allow for flexible implementation of Velocimacros. Note that these are also documented in the Developer Guide.

    velocimacro.library.path - A comma-separated list of all Velocimacro template libraries. By default, Velocity looks for a single library: velocimacros.vtl (since 2.1 ; and if not found it will also look at the old default VM_global_library.vm). The configured template path is used to find the Velocimacro libraries.

    Modified: velocity/site/production/engine/devel/changes.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/changes.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/devel/changes.html (original) +++ velocity/site/production/engine/devel/changes.html Fri Jan 24 09:56:36 2020 @@ -325,6 +325,34 @@ h2:hover > .headerlink, h3:hover > .head + + + Fixed regression: Macro arguments names cannot collide with external references names . Fixes VELOCITY-926. + cbrisson + + + + + + Fixed macro calls without parenthesis eating the following newline in BC mode . Fixes VELOCITY-925. + cbrisson + + + + + + Fixed bad cache handling for java.lang.Class methods . Fixes VELOCITY-924. + cbrisson + + + + + + Fixed parser regression when || follow a Velocity expression . Fixes VELOCITY-923. + cbrisson + + + Added BigInteger and BigDecimal implicit conversions . Modified: velocity/site/production/engine/devel/dependencies.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/dependencies.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/devel/dependencies.html (original) +++ velocity/site/production/engine/devel/dependencies.html Fri Jan 24 09:56:36 2020 @@ -257,7 +257,7 @@ h2:hover > .headerlink, h3:hover > .head junit -4.12 +4.13 No Yes No Modified: velocity/site/production/engine/devel/upgrading.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/upgrading.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/devel/upgrading.html (original) +++ velocity/site/production/engine/devel/upgrading.html Fri Jan 24 09:56:36 2020 @@ -386,6 +386,8 @@ Please note that the maven repository pa
  • method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property runtime.conversion.handler.class = none.
  • space gobbling (to control the indentation of generated code) is now configurable via the space.gobbing configuration key, which can take the following values: none, bc (aka. backward compatible), lines and structured. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to bc.
  • the #foreach predefined references $velocityCount and $velocityHasNext have been removed. Use $foreach.count (1-based), $foreach.index (0-based) and foreach.hasNext().
  • +
  • Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
  • +
  • Velocimacros do not anymore have a proxy context of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
  • Dependency Changes

      Modified: velocity/site/production/engine/devel/user-guide.html URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/user-guide.html?rev=1873097&r1=1873096&r2=1873097&view=diff ============================================================================== --- velocity/site/production/engine/devel/user-guide.html (original) +++ velocity/site/production/engine/devel/user-guide.html Fri Jan 24 09:56:36 2020 @@ -1026,7 +1026,7 @@ $foo
    • boolean value true
    • boolean value false
    -

    When passing references as arguments to Velocimacros, please note that references are passed 'by name'. This means that their value is 'generated' at each use inside the Velocimacro. This feature allows you to pass references with method calls and have the method called at each use. For example, when calling the following Velocimacro as shown

    +

    Since 2.0, Velocimacros arguments are passed by value (or, more precisely, the result of their evaluation is passed by reference). This means that they are evaluated only once, even when used several times inside the macro. It means that in the following example:

    #macro( callme $a )
         $a $a $a
     #end
    @@ -1035,14 +1035,7 @@ $foo
     
    -

    results in the method bar() of the reference $foo being called 3 times.

    -

    At first glance, this feature appears surprising, but when you take into consideration the original motivation behind Velocimacros -- to eliminate cut'n'paste duplication of commonly used VTL -- it makes sense. It allows you to do things like pass stateful objects, such as an object that generates colors in a repeating sequence for coloring table rows, into the Velocimacro.

    -

    If you need to circumvent this feature, you can always just get the value from the method as a new reference and pass that :

    -
    #set( $myval = $foo.bar() )
    -#callme( $myval )
    -
    - - +

    the method bar() of the reference $foo is only called once.

    Velocimacro Properties

    Several lines in the velocity.properties file allow for flexible implementation of Velocimacros. Note that these are also documented in the Developer Guide.

    velocimacro.library.path - A comma-separated list of all Velocimacro template libraries. By default, Velocity looks for a single library: velocimacros.vtl (since 2.1 ; and if not found it will also look at the old default VM_global_library.vm). The configured template path is used to find the Velocimacro libraries.