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


##########
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:
   Thanks @LuciferYang for the quick reply.
   I made some change  
   - updated  
   ```java
   static String join(String sep, String... elements) {
       return join(sep, Arrays.asList(elements));
     }
   ```
   - Updated the commit message & the title description of jira-ticket & the 
title of the PR.
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to