[
https://issues.apache.org/jira/browse/VELOCITY-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621605#comment-16621605
]
Thomas Mortagne commented on VELOCITY-542:
------------------------------------------
I strongly agree with [[email protected]]. This makes upgrading to
(standard) Velocity 2 a major risk for many existing scripts.
I can perfectly understand breakages in the Java API in a new major version but
the language retro compatibility is critical IMO.
> minus sign in #set requires spaces to surround it
> -------------------------------------------------
>
> Key: VELOCITY-542
> URL: https://issues.apache.org/jira/browse/VELOCITY-542
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.5
> Reporter: Will Glass-Husain
> Assignee: Claude Brisson
> Priority: Minor
> Fix For: 2.0
>
>
> The following example:
> #set($thisCampNumber = 10)
> #set($nextCampNumber = $thisCampNumber+1)
> #set($previousCampNumber = $thisCampNumber-1)
> #set($previousCampNumberB = $thisCampNumber - 1)
> 1: $thisCampNumber<br>
> 2: $nextCampNumber<br>
> 3: $previousCampNumber<br>
> 4: $previousCampNumberB<br>
> produces this result
> 1: 10
> 2: 11
> 3: $previousCampNumber
> 4: 9
> Note that using a minus sign in a #set statement does not work if there are
> no spaces around it. (however, the same is not true for +).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]