Message: A new issue has been created in JIRA.
--------------------------------------------------------------------- View the issue: http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-88 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 Components: core / taglib.core Assignee: Reporter: Scott Howlett Created: Tue, 30 Sep 2003 11:36 AM Updated: Tue, 30 Sep 2003 11:36 AM Description: 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: foo.jelly: <?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> bar.jelly: <j:jelly xmlns:j="jelly:core"> ${test} </j:jelly> 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 JexlExpression.java - 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). --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
