From 4e72fb712ddba53a96a0868f7abbc2fa940c73bc Mon Sep 17 00:00:00 2001 From: Reshma Date: Thu, 22 Jan 2026 11:23:10 -0500 Subject: [PATCH 1/2] Added backward compatability lines --- .../velocity/runtime/defaults/velocity.properties | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties index e790f7906..51669f5fa 100644 --- a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties +++ b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties @@ -44,7 +44,7 @@ directive.foreach.max_loops = -1 # as long as zero numbers, do evaluate to false. # ---------------------------------------------------------------------------- -directive.if.empty_check = true +directive.if.empty_check = false # ---------------------------------------------------------------------------- # P A R S E P R O P E R T I E S @@ -206,7 +206,7 @@ introspector.uberspect.class = org.apache.velocity.util.introspection.UberspectI # Sets the data types Conversion Handler used by the default uberspector # ---------------------------------------------------------------------------- -introspector.conversion_handler.class = org.apache.velocity.util.introspection.TypeConversionHandlerImpl +introspector.conversion_handler.class = none 1 # ---------------------------------------------------------------------------- @@ -248,7 +248,7 @@ introspector.restrict.classes = javax.script.ScriptEngine # Possible values: none, bc (aka Backward Compatible), lines, structured # ---------------------------------------------------------------------------- -parser.space_gobbling = lines +parser.space_gobbling = bc # ---------------------------------------------------------------------------- # HYPHEN IN IDENTIFIERS @@ -256,4 +256,7 @@ parser.space_gobbling = lines # Set to true to allow '-' in reference identifiers (backward compatibility option) # ---------------------------------------------------------------------------- -parser.allow_hyphen_in_identifiers = false +parser.allow_hyphen_in_identifiers = true + +# When displaying null arguments literals, use provided arguments literals (since 2.1) +velocimacro.arguments.preserve_literals = true From 91858f1fec672c9c66f3dcaf85a1f6a7a662accf Mon Sep 17 00:00:00 2001 From: Reshma Date: Thu, 22 Jan 2026 12:48:06 -0500 Subject: [PATCH 2/2] Changed velocimacro.enable_bc_mode to true --- .../org/apache/velocity/runtime/defaults/velocity.properties | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties index 51669f5fa..e51cb6273 100644 --- a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties +++ b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties @@ -127,8 +127,7 @@ velocimacro.body_reference = bodyContent # without an explicit default value is missing from the macro call, its value # will be looked up in the global context # ---------------------------------------------------------------------------- -velocimacro.enable_bc_mode = false - +velocimacro.enable_bc_mode = true # ---------------------------------------------------------------------------- # STRICT REFERENCE MODE # ---------------------------------------------------------------------------- @@ -258,5 +257,5 @@ parser.space_gobbling = bc parser.allow_hyphen_in_identifiers = true -# When displaying null arguments literals, use provided arguments literals (since 2.1) +# When displaying null arguments literals, use provided arguments literals velocimacro.arguments.preserve_literals = true