Skip to content

Commit

Permalink
Simplify code. Patch provided by Paolo B.
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Nov 7, 2024
1 parent feedb98 commit fed15e3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions java/org/apache/el/parser/AstMethodParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -36,11 +33,11 @@ public Object[] getParameters(EvaluationContext ctx) {
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
Expand Down

0 comments on commit fed15e3

Please sign in to comment.