Varargs <http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html> could be supported easily since it is possible to retrieve the information whether or not method has vargargs and vararg can only exist as last argument.
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