This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 f8db345f27 Avoid evaluating twice
f8db345f27 is described below
commit f8db345f27944d64cb16f64946283ed8e8a42f9f
Author: remm <[email protected]>
AuthorDate: Tue Sep 1 14:31:59 2026 +0200
Avoid evaluating twice
Found by code review.
---
java/org/apache/el/parser/AstConcatenation.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/el/parser/AstConcatenation.java
b/java/org/apache/el/parser/AstConcatenation.java
index ae83893170..cb340e446b 100644
--- a/java/org/apache/el/parser/AstConcatenation.java
+++ b/java/org/apache/el/parser/AstConcatenation.java
@@ -32,8 +32,8 @@ public class AstConcatenation extends SimpleNode {
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
// Coerce the two child nodes to string and then concatenate
- String s1 = ELSupport.coerceToString(ctx, children[0].getValue(ctx));
- String s2 = ELSupport.coerceToString(ctx, children[1].getValue(ctx));
+ String s1 = ELSupport.coerceToString(ctx, obj0);
+ String s2 = ELSupport.coerceToString(ctx, obj1);
return s1 + s2;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]