This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new c4ae597d37 Avoid evaluating twice
c4ae597d37 is described below
commit c4ae597d3702f91241e13a7c50fcea6b8f5de3f6
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]