commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Created: (JELLY-88) Jexl Expressions don't obey scope inheritance
Date Tue, 30 Sep 2003 16:37:08 GMT

  A new issue has been created in JIRA.

View the issue:

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

     Status: Unassigned
   Priority: Major

 Time Spent: Unknown
  Remaining: 5 minutes

    Project: jelly
             core / taglib.core

   Reporter: Scott Howlett

    Created: Tue, 30 Sep 2003 11:36 AM
    Updated: Tue, 30 Sep 2003 11:36 AM

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:

View raw message