[ 
https://issues.apache.org/jira/browse/VELOCITY-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claude Brisson closed VELOCITY-922.
-----------------------------------
    Resolution: Not A Problem

After further consideration and enquiry, better leave it that way:

* This behavior is clearly documented
* Declaring empty or null references in the context is a way of checking what 
is admissible, and can be used to track typos

And we already abundantly  discussed this issue three years ago. D'oh.



> Strict mode and silent references
> ---------------------------------
>
>                 Key: VELOCITY-922
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-922
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 2.1
>            Reporter: Claude Brisson
>            Assignee: Claude Brisson
>            Priority: Major
>
> When runtime.strict_mode.enable is true, $!foo will not throw if $foo is in 
> the context with a null value, but will throw if $foo is not in the context.
> I know it's a design choice, but it makes the strict mode totally 
> impraticable. I think silence references should never throw, ever, even in 
> strict mode, otherwise they just break their contract.
> Plus, distinguishing between those two cases (absent from the context, or 
> present with null) seems pretty weird and inconsistant to me. I understand 
> the initial motivation of validating the context, but it's just inconsistant. 
> Silent mode *should* take precedence over strict mode.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to