This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 6e2f85d267 Simplify code. Patch provided by Paolo B.
6e2f85d267 is described below
commit 6e2f85d267964d4d16fd6062c07a061c8045da76
Author: Mark Thomas <[email protected]>
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 4f5c78c5c9..034f186b36 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 {
@@ -37,11 +34,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;
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b56af21920..d2edf65d2c 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 9.0.98 (remm)" 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 9.0.97 (remm)" rtext="release in progress">
<subsection name="Catalina">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]