CalvinKirs commented on a change in pull request #2920:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2920#discussion_r440009824



##########
File path: 
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/IpUtils.java
##########
@@ -49,12 +49,11 @@ public static String longToIp(long ipLong) {
     ipNumbers[2] = ipLong >> 8 & tmp;
     ipNumbers[3] = ipLong & tmp;
 
-    StringBuilder sb = new StringBuilder(16);
-    sb.append(ipNumbers[0]).append(DOT)
-            .append(ipNumbers[1]).append(DOT)
-            .append(ipNumbers[2]).append(DOT)
-            .append(ipNumbers[3]);
-    return sb.toString();
+    String sb = ipNumbers[0] + DOT +

Review comment:
       Because the use here is the same, and String performance is better in 
this case, the code is also more concise




----------------------------------------------------------------
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.

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


Reply via email to