[ 
http://issues.apache.org/jira/browse/VELOCITY-459?page=comments#action_12436448 
] 
            
Stephen Haberman commented on VELOCITY-459:
-------------------------------------------

Yep, "ant test" passes. Thanks for making it easy to run the tests (e.g. I 
didn't have to install maven--whew.)

No, I do not think it is related to 262--that seems to be talking about a 
parsing issue. I guess.

For us, everything parsed fine, we just kept getting back as "null" any 
variables defined outside our variable. So we wanted to turn localscope off. 
But then we'd do macro recursion and they'd stomp on each others internal 
variables when setting, and we'd want localscope back on. This let us have the 
best of both worlds.

> localscope doesn't allow get to leak
> ------------------------------------
>
>                 Key: VELOCITY-459
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-459
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>            Reporter: Stephen Haberman
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: localscopeGetFix.diff
>
>
> In short, we wanted "localscope" on for macros due to some recursion. 
> However, this meant that both puts /and/ gets only use the localscope.
> For gets this seems overly restrictive--if I set "foo=bar" in my base 
> VelocityContext, and then get into my macro, it should be able to reach that 
> "foo" even if it can't overwrite it.
> The attached patch relaxes the "VMContext.get" to let it check first the 
> local scope and then the inner scope. Included is a test that makes sure an 
> "outsideVar" is accessible from VMContext even if localscope is on.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to