Summary: | Support for EL functions with varargs | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Tuomas Kiviaho <tuomas.kiviaho> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 6.0.14 | ||
Target Milestone: | default | ||
Hardware: | Other | ||
OS: | other | ||
Attachments: |
AstFunction.patch
AstFunction.patch ExpressionBuilder.patch alternative.patch FunctionMapperImpl.patch |
Description
Tuomas Kiviaho
2008-01-25 02:39:33 UTC
Created attachment 21426 [details]
AstFunction.patch
Created attachment 21567 [details]
AstFunction.patch
Created attachment 21569 [details]
ExpressionBuilder.patch
ExpressionBuilder has parameter length check that has to deal with var args as
well. I think this is premature validation as the purpose of visitor is merely
to populate variable mapper and function resolver. I believe it would be more
consistent move this check to AstFunction.
Please note that JSP translation time validation is done at
org.apache.jasper.compiler.Validator.ValidateVisitor.getFunctionMapper. Vararg
support could/should be implemented these as well.
Created attachment 21570 [details]
alternative.patch
Alternative approach where logic from ExpressionBuilder is moved to AstFunction
Created attachment 21593 [details]
FunctionMapperImpl.patch
java.lang.NullPointerException
at
org.apache.el.lang.FunctionMapperImpl.resolveFunction(FunctionMapperImpl.java:53)
at org.apache.el.parser.AstFunction.getValue(AstFunction.java:87)
alternative.patch revealed that FunctionMapperImpl doesn't quite comply with
the API
Fixed by back-porting existing support from 8.0.x Fixed in: - 7.0.x for 7.0.74 onwards - 6.0.x for 6.0.49 onwards |