string concat in StringBuilder append chain (#1984)

pull/2008/head
XenoAmess 3 years ago committed by GitHub
parent 09765b00fa
commit c73c3d10a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -694,14 +694,14 @@ public class Bootstrap {
result.append("Local versions:\n"); result.append("Local versions:\n");
for (String version : versionList) { for (String version : versionList) {
result.append(" " + version).append('\n'); result.append(" ").append(version).append('\n');
} }
result.append("Remote versions:\n"); result.append("Remote versions:\n");
List<String> remoteVersions = DownloadUtils.readRemoteVersions(); List<String> remoteVersions = DownloadUtils.readRemoteVersions();
Collections.reverse(remoteVersions); Collections.reverse(remoteVersions);
for (String version : remoteVersions) { for (String version : remoteVersions) {
result.append(" " + version).append('\n'); result.append(" ").append(version).append('\n');
} }
return result.toString(); return result.toString();
} }

@ -98,10 +98,10 @@ public class TraceView extends ResultView<TraceModel> {
//trace_id //trace_id
if (threadNode.getTraceId() != null) { if (threadNode.getTraceId() != null) {
sb.append(";trace_id="+threadNode.getTraceId()); sb.append(";trace_id=").append(threadNode.getTraceId());
} }
if (threadNode.getRpcId() != null) { if (threadNode.getRpcId() != null) {
sb.append(";rpc_id="+threadNode.getRpcId()); sb.append(";rpc_id=").append(threadNode.getRpcId());
} }
} else if (node instanceof ThrowNode) { } else if (node instanceof ThrowNode) {
ThrowNode throwNode = (ThrowNode) node; ThrowNode throwNode = (ThrowNode) node;

@ -97,7 +97,7 @@ public class ViewRenderUtil {
affectVO.getListenerId())); affectVO.getListenerId()));
if (affectVO.getThrowable() != null) { if (affectVO.getThrowable() != null) {
infoSB.append("\nEnhance error! exception: " + affectVO.getThrowable()); infoSB.append("\nEnhance error! exception: ").append(affectVO.getThrowable());
} }
infoSB.append("\n"); infoSB.append("\n");

@ -91,9 +91,9 @@ public class UserStatUtil {
public void appendQueryData(String key, String value) { public void appendQueryData(String key, String value) {
if (key != null && value != null) { if (key != null && value != null) {
if (queryData.length() == 0) { if (queryData.length() == 0) {
queryData.append(key + "=" + value); queryData.append(key).append("=").append(value);
} else { } else {
queryData.append("&" + key + "=" + value); queryData.append("&").append(key).append("=").append(value);
} }
} }
} }

@ -144,7 +144,7 @@ public final class EnhancerAffect extends Affect {
cost(), cost(),
listenerId)); listenerId));
if (this.throwable != null) { if (this.throwable != null) {
infoSB.append("\nEnhance error! exception: " + this.throwable); infoSB.append("\nEnhance error! exception: ").append(this.throwable);
} }
return infoSB.toString(); return infoSB.toString();
} }

Loading…
Cancel
Save