IdentifyUtil 77 lines of StringBuilder can use string + instead to simplify the code #1093 (#1104)

pull/1113/head
ShengTongSun 3 years ago committed by LiXuemin
parent 51457f64ab
commit 6c43c1c8f6

@ -74,13 +74,11 @@ public class IdentifyUtil {
ip = inetUtil.findFirstNonLoopBackHostInfo().getIpAddress();
port = environment.getProperty("server.port", "8080");
}
String identify = new StringBuilder()
.append(ip)
.append(":")
.append(port)
.append(IDENTIFY_SLICER_SYMBOL)
.append(CLIENT_IDENTIFICATION_VALUE)
.toString();
String identify = ip
+ ":"
+ port
+ IDENTIFY_SLICER_SYMBOL
+ CLIENT_IDENTIFICATION_VALUE;
IDENTIFY = identify;
return identify;
}

Loading…
Cancel
Save