velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna (JIRA)" <>
Subject [jira] Commented: (VELOCITY-618) Strict property and method references
Date Thu, 09 Oct 2008 03:25:44 GMT


Nathan Bubna commented on VELOCITY-618:

I wouldn't bet against you on developers' first reaction.   But i'll have to surprise you
and cry foul over the inconsistency.  :)   I just don't feel we need to go around adding special
cases to an escaping system that is already confusing.   Really, i can appreciate your concern,
but it feels wrong to me to have a "strict reference mode" property change escaping rules
for references.   I'm stretched enough by having "strict *reference* mode" be strict about
undefined macros as well.

If you really want to pursue configurability of escaping behavior, that's probably best left
for a different issue/patch/property.

I really don't think abc${D}xyz  is all that onerous.  i use that type of escaping regularly.

> Strict property and method references
> -------------------------------------
>                 Key: VELOCITY-618
>                 URL:
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>            Reporter: Byron Foster
>             Fix For: 1.5.1, 1.6
>         Attachments: MacroAndVarEscape.patch, strictPropertyAndVariable_3.patch
> The given patch against trunk adds a new option 'runtime.references.strict'.  When set
to true, invalid property references will throw a InvalidMethodException.  For example $
will throw an exception if the object contained in $foo has no such property as bar.  Any
kind of reference to bar will cause an exception including:
> #if(
> #set($ = "junk")
> #set($foo.getBar())
> etc...

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