mykolap opened a new pull request, #1130: URL: https://github.com/apache/tomcat/pull/1130
When an EL function whose method is varargs was called with exactly one argument for the varargs parameter, AstFunction evaluated that argument twice: once to check whether it is already an array and once more for the value. An argument with side effects ran twice, the function received the result of the second evaluation, and an expensive argument cost double. Evaluate the argument once and use the value both for the array check and as the single varargs element. Calls with two or more varargs values and the single array argument case are unchanged. Adds a test that counts the evaluations of a method call used as the single varargs argument. The test reports two evaluations against the previous implementation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
