[jira] [Resolved] (VELTOOLS-209) velocity 1.7 vs velocity 2.3: evaluation of scripts with empty value is not backward compatible

"Claude Brisson (Jira)" <[email protected]> Wed, 17 Jun 2026 14:39:00 +0000 (UTC)
Newsgroups gmane.comp.jakarta.velocity.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/VELTOOLS-209?page=3Dcom.atlass=
ian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claude Brisson resolved VELTOOLS-209.
-------------------------------------
      Assignee: Claude Brisson
    Resolution: Cannot Reproduce

> velocity 1.7 vs velocity 2.3: evaluation of scripts with empty value is n=
ot backward compatible
> -------------------------------------------------------------------------=
----------------------
>
>                 Key: VELTOOLS-209
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-209
>             Project: Velocity Tools
>          Issue Type: Bug
>          Components: GenericTools
>    Affects Versions: 2.0, 3.1
>            Reporter: ambika
>            Assignee: Claude Brisson
>            Priority: Major
>
> {*}Script{*}:=C2=A0 =C2=A0 =C2=A0
> =C2=A0
> =C2=A0 "vLATE_GATE_IN_6":"#set( $inTimeZone =3D $date.getTimeZone().getTi=
meZone('Europe/Berlin') )\n\n#set( $outTimeZone =3D $date.getTimeZone().get=
TimeZone('Asia/Shanghai') )\n\n#set( $locale =3D $date.getLocale() )\n\n#se=
t( $myDate =3D $convert.parseDate(${*}{lead.lateGateIn}{*},\"yyyy-MM-dd HH:=
mm\",$locale,$inTimeZone) )\n\n${date.format('yyyy-MM-dd hh:mm a',$myDate,$=
locale,$outTimeZone)} "
> {*}note{*}: lead.lateGateIn =3D "" in the values=C2=A0
> there are multiple other scripts vLATE_GATE_IN_5, vLATE_GATE_IN_4 but in =
the script vLATE_GATE_IN_4 , the values for convert.parseDate is given as b=
elow:
> $convert.parseDate("2022-04-22")=C2=A0
> =C2=A0
> {*}Issue{*}:=C2=A0
> Older version of velocity evaluates the script vLATE_GATE_IN_6 to:=C2=A0
> |Time):\\n\\n\\n\\n\\n2022-04-22 11:00 AM|
> =C2=A0
> Newer version of velocity evaluates the script vLATE_GATE_IN_6 to:=C2=A0
> |=C2=A0|Time):\\n\\n\\n\\n\\n${date.format('yyyy-MM-dd hh:mm a',$myDate,$=
locale,$outTimeZone)}|=C2=A0|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)