velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byron Foster (JIRA)" <...@velocity.apache.org>
Subject [jira] Commented: (VELOCITY-688) ! preceding a reference in strict mode ignores a null exception
Date Wed, 11 Feb 2009 05:38:59 GMT

    [ https://issues.apache.org/jira/browse/VELOCITY-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672515#action_12672515
] 

Byron Foster commented on VELOCITY-688:
---------------------------------------

Nathan, the answer to your question is yes :)

Ok, sounds fair.  I'v changed the behavior back to the original behavior of this issue, i.e.,
if $foo is null an exception is thrown, if $!foo is null, then render nothing.

Anyway, the prior behavior can always be achieved by adding an insertReference handler that
handles nulls.




> ! preceding a reference in strict mode ignores a null exception
> ---------------------------------------------------------------
>
>                 Key: VELOCITY-688
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-688
>             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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Mime
View raw message