You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/11/01 11:44:37 UTC

(commons-jexl) branch master updated: Reuse String.join()

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git


The following commit(s) were added to refs/heads/master by this push:
     new bb217b0c Reuse String.join()
bb217b0c is described below

commit bb217b0cd446533705022043c9c80df958a571f2
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 1 07:44:32 2025 -0400

    Reuse String.join()
---
 src/main/java/org/apache/commons/jexl3/parser/JexlParser.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java b/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
index 37a62d35..6f65b989 100644
--- a/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
+++ b/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
@@ -156,14 +156,7 @@ public abstract class JexlParser extends StringParser implements JexlScriptParse
      * @return the dotted version
      */
     protected static String stringify(final Iterable<String> lstr) {
-        final StringBuilder strb = new StringBuilder();
-        for(final String str : lstr) {
-            if (strb.length() > 0) {
-               strb.append('.');
-            }
-            strb.append(str);
-        }
-        return strb.toString();
+        return String.join(".", lstr);
     }
     /**
      * The associated controller.