commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Taylor (JIRA)" <>
Subject [jira] Commented: (EL-8) [el] Implementation of parseExpression does not implement spec
Date Tue, 21 Aug 2007 14:59:30 GMT


Jamie Taylor commented on EL-8:

I had always intended the patch and unit test for inclusion.  I thought slapping the Apache
license at the top of each file would be sufficient.  In any case, yes, it's intended to be
licensed to the ASF.

I don't have to code for the patch from function-binding.txt on this machine (at work right
now), but I might be able to give you an idea of what it's doing.  Since function invocations
can live arbitrarily deep in the syntax tree, the only way to find them all is to recurse
through the tree.  This is what your patch did not do, so it failed on an example where the
function call was nested inside another function call.  Rather than try to recurse through
the tree externally, my patch adds a method to the nodes in the syntax tree.  The result is
another syntax tree, with the function invocation nodes replaced by "bound" function invocation

It's a lot of code, spread out over several files... but it should be easy to follow.  I suggest
starting at Expression.bindFunctions.  It looks like the patch also has some stuff in there
that wasn't strictly necessary - like having run the eclipse "organize imports" on everything.

> [el] Implementation of parseExpression does not implement spec
> --------------------------------------------------------------
>                 Key: EL-8
>                 URL:
>             Project: Commons EL
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Jamie Taylor
>             Fix For: 1.1
>         Attachments: EL-8.patch, function-binding.txt,,
> The implementation of parseExpression in the EL expression evaluator does not conform
to the JSP 2.0 specification.  The javadoc for the fMapper argument states that 
> "The ExpressionEvaluatormustnotholdontotheFunctionMapperreferenceafter returning fromparseExpression().
TheExpression object returned must invoke the same functions regardless of whether the mappings
in the providedFunctionMapper instance change between calling ExpressionEvaluator.parseExpression()
> The test case which I will attach clearly shows that this is not the case.
> Why hasn't anybody noticed this before, you may ask?  I suspect that the current implementation
of Tomcat never updates the bindings in its function mapper once one is constructed, since
the functions are defined at web-app load time and can't be updated after that.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message