You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <ji...@apache.org> on 2018/10/02 15:05:00 UTC
[jira] [Resolved] (VELOCITY-902) User guide for #set does not match
behaviour
[ https://issues.apache.org/jira/browse/VELOCITY-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson resolved VELOCITY-902.
-------------------------------------
Resolution: Fixed
Assignee: Claude Brisson
Fix Version/s: 2.0
Fixed. Thanks for the report.
> User guide for #set does not match behaviour
> --------------------------------------------
>
> Key: VELOCITY-902
> URL: https://issues.apache.org/jira/browse/VELOCITY-902
> Project: Velocity
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 2.0, 2.1.x
> Reporter: Mike Capp
> Assignee: Claude Brisson
> Priority: Minor
> Fix For: 2.0
>
>
> [http://velocity.apache.org/engine/2.0/user-guide.html#set] and [http://velocity.apache.org/engine/devel/user-guide.html#set] both have about a page of text explaining that {{#set}} will ignore any assignment with a null RHS and suggesting workarounds. However, even using the exact example shown, 2.0 does *not* ignore null RHSs, and the workarounds don't workatall, which as a complete newbie caused me a lot of head-scratching.
> I can provide my (very simple) test harness and template if necessary, but the following caught my eye while trawling through the [changelog|http://velocity.apache.org/engine/2.0/changes.html]:
> {quote}Remove directive.set.null.allowed and instead always allow null to be #set to references. This also means removing all NullSetEventHandler code, since it was only in play when nulls were not allowed to be #set.
> {quote}
> Which looks as if this was a deliberate change which forgot to update the user docs. I'm all in favour of the change, btw; the old documented behaviour was horrible. I'm just looking for some reassurance that I can rely on it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org