velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byron Foster (JIRA)" <>
Subject [jira] Commented: (VELOCITY-688) ! preceding a reference in strict mode ignores a null exception
Date Tue, 10 Feb 2009 16:37:02 GMT


Byron Foster commented on VELOCITY-688:

Well, I figure rendering $foo as a blank string when it is null is the more natural thing
to do, and the behavior that in most cases will be desired.  I Just made it so that if people
really want an exception thrown when $foo is equal to null, they could use the bang syntax
($!foo).  But, this is more just using an existing syntax mechanism more then anything else.
 I could just as easily in strict mode go with the bang not doing anything at all, I don't
think it's really needed. Not sure, thoughts?

> ! preceding a reference in strict mode ignores a null exception
> ---------------------------------------------------------------
>                 Key: VELOCITY-688
>                 URL:
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>             Fix For: 1.7
> Change strict mode (runtime.references.strict = true) behavior such that when Velocity
attempts to render a reference that evaluates to null then throw an exception.  If the reference
is preceded by '$!' as in $!foo, then simply render nothing and ignore the null value as it
does for non strict mode.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message