You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (Jira)" <ji...@apache.org> on 2019/11/21 10:33:00 UTC
[jira] [Created] (VELOCITY-922) Strict mode and silent references
Claude Brisson created VELOCITY-922:
---------------------------------------
Summary: 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
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-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org