This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new fed15e3e2f Simplify code. Patch provided by Paolo B.
fed15e3e2f is described below
commit fed15e3e2f24400c71ca15dc1f59b710b5fa9130
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Nov 7 14:52:30 2024 +0000
Simplify code. Patch provided by Paolo B.
---
java/org/apache/el/parser/AstMethodParameters.java | 9 +++------
1 file changed, 3 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]