This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push: new 23543e0888 Simplify code. Patch provided by Paolo B. 23543e0888 is described below commit 23543e0888a2cc2f46aa8f7d4d8bbe12ee54f125 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Nov 7 14:54:56 2024 +0000 Simplify code. Patch provided by Paolo B. --- java/org/apache/el/parser/AstMethodParameters.java | 9 +++------ webapps/docs/changelog.xml | 8 ++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/java/org/apache/el/parser/AstMethodParameters.java b/java/org/apache/el/parser/AstMethodParameters.java index d127deec9e..f12cd2f9c9 100644 --- a/java/org/apache/el/parser/AstMethodParameters.java +++ b/java/org/apache/el/parser/AstMethodParameters.java @@ -17,9 +17,6 @@ /* Generated By:JJTree: Do not edit this line. AstDotSuffix.java */ package org.apache.el.parser; -import java.util.ArrayList; -import java.util.List; - import org.apache.el.lang.EvaluationContext; public final class AstMethodParameters extends SimpleNode { @@ -36,11 +33,11 @@ public final class AstMethodParameters extends SimpleNode { if (numChildren == 0) { return EMPTY_OBJECT_ARRAY; } - List<Object> params = new ArrayList<>(); + Object[] params = new Object[numChildren]; for (int i = 0; i < numChildren; i++) { - params.add(this.jjtGetChild(i).getValue(ctx)); + params[i] = this.jjtGetChild(i).getValue(ctx); } - return params.toArray(EMPTY_OBJECT_ARRAY); + return params; } @Override diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b404ea8ede..409ac1e589 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,14 @@ issues do not "pop up" wrt. others). --> <section name="Tomcat 11.0.2 (markt)" rtext="in development"> + <subsection name="Jasper"> + <changelog> + <fix> + Further optimise EL evaluation of method parameters. Patch provided by + Paolo B. (markt) + </fix> + </changelog> + </subsection> </section> <section name="Tomcat 11.0.1 (markt)" rtext="release in progress"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org