commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Closed: (JELLY-88) Jexl Expressions don't obey scope inheritance
Date Thu, 12 Aug 2004 03:50:20 GMT

   The following issue has been closed.

   Resolver: dion gillard
       Date: Wed, 11 Aug 2004 8:49 PM

Fixed in CVS already
View the issue:

Here is an overview of the issue:
        Key: JELLY-88
    Summary: Jexl Expressions don't obey scope inheritance
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: jelly
             core / taglib.core
   Fix Fors:

   Reporter: Scott Howlett

    Created: Tue, 30 Sep 2003 11:36 AM
    Updated: Wed, 11 Aug 2004 8:49 PM

A JexlExpression gets variables via the following JellyMap method: 

    public Object get(Object key) { 
        return context.findVariable( (String) key ); 

findVariable() locates requested variable in any enclosing scope regardless of inheritance.
This is an error - getVariable() ought to be used instead.

The problem can be seen in the following example:

Given these scripts: 


<?xml version="1.0"?> 
<j:jelly xmlns:j="jelly:core"> 
    <j:set var="test" value="goofy"/> 
    <j:import inherit="false" uri="bar.jelly"/> 


<j:jelly xmlns:j="jelly:core"> 

When I execute foo.jelly, the expression in bar.jelly finds the value of test even though
inheritance is false. 

I looked through the CVS history for - it looks like the statement in
question was inadvertently changed from getVariable() to findVariable() between revisions
8 and 9 (the change is not described in the revision 9 checkin comment).

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message