You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org> on 2008/10/28 05:42:44 UTC
[jira] Commented: (VELOCITY-553) Posibility to configure
ReportInvalidReferences to don't report report variables,properties and
method which exist, but only have null value
[ https://issues.apache.org/jira/browse/VELOCITY-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643130#action_12643130 ]
Will Glass-Husain commented on VELOCITY-553:
--------------------------------------------
Hi,
Looking at this issue. There's a couple of cases here, any comment?
$something.abc where there is no $something in the context
--> should call the event handler
$something.abc where this is no property getAbc() or isAbc()
--> should call the event handler
$something.abc where $something.getAbc() is null
--> should not call the event handler
But how about
$something.abc.def where $something.getAbc() is null
--> I'd argue this should call the event handler
In other words, a null response doesn't trigger this, but calling another method on top of null does.
Seem reasonable?
> Posibility to configure ReportInvalidReferences to don't report report variables,properties and method which exist, but only have null value
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: VELOCITY-553
> URL: https://issues.apache.org/jira/browse/VELOCITY-553
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 1.5
> Environment: any
> Reporter: Tomáš Procházka
> Fix For: 1.6
>
>
> ReportInvalidReferences has very big imperfection, it report by default all variables, properties and method which has null value.
> This may cause many problems for developer.
> I for example need only validate template without any data, only check which contain right variables, properties or method (which exist), it's value is not important for me.
> I tried use my own ReferenceInsertionEventHandler for replace null value with "" (empty String) but Velocity call InvalidReference handler before ReferenceInsertionEventHandler.
> I suggest configuration options for this (repor or doesn't report null value)
--
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