LuciferYang commented on code in PR #49826:
URL: https://github.com/apache/spark/pull/49826#discussion_r1944500609


##########
launcher/src/main/java/org/apache/spark/launcher/CommandBuilderUtils.java:
##########
@@ -46,24 +47,15 @@ static boolean isEmpty(String s) {
 
   /** Joins a list of strings using the given separator. */
   static String join(String sep, String... elements) {
-    StringBuilder sb = new StringBuilder();
-    for (String e : elements) {
-      if (e != null) {
-        if (sb.length() > 0) {
-          sb.append(sep);
-        }
-        sb.append(e);
-      }
-    }
-    return sb.toString();
+    return join(sep, Arrays.stream(elements).toList());

Review Comment:
   fine for me, but, please update the PR title to better reflect what this PR 
has done.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to