[jira] [Resolved] (VELTOOLS-210) velocity 1.7 vs velocity 2.3 : the evaluation of if condition in script is different
"Claude Brisson (Jira)" <[email protected]> Wed, 17 Jun 2026 14:37:00 +0000 (UTC)
| Newsgroups | gmane.comp.jakarta.velocity.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/VELTOOLS-210?page=3Dcom.atlass=
ian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson resolved VELTOOLS-210.
-------------------------------------
Assignee: Claude Brisson
Resolution: Cannot Reproduce
> velocity 1.7 vs velocity 2.3 : the evaluation of if condition in script i=
s different=20
> -------------------------------------------------------------------------=
------------
>
> Key: VELTOOLS-210
> URL: https://issues.apache.org/jira/browse/VELTOOLS-210
> Project: Velocity Tools
> Issue Type: Bug
> Components: VelocityView
> Affects Versions: 3.1
> Reporter: ambika
> Assignee: Claude Brisson
> Priority: Major
>
> *script used :*=C2=A0
> =C2=A0
> Map<String, Object> variables =3D new HashMap<>();
> variables.put("key1", "value");
> =C2=A0
> Context context =3D velocityEngine.getToolsContext(variables);
> =C2=A0
> String inString =3D "#set($value =3D \"key value false\")" +
> "#if(${key1} =3D=3D 1 ||\"yes\" )" +
> " #set($value =3D \"{*}{{*}}key value true{{*}}{*}\")" +
> "#end\n${value}";
> =C2=A0
> inString =3D velocityEngine.evaluate(context, "tag", inString);
> System.out.println(inString);
> =C2=A0
> =C2=A0
> Output:
> =C2=A0
> older version output : key value true
> =C2=A0
> newer version output : key value false=C2=A0
> =C2=A0
> =C2=A0
> =C2=A0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)