From c942d442e82f5ccc3678969cac56e98e478a0a8c Mon Sep 17 00:00:00 2001 From: lilu Date: Mon, 29 Jun 2020 15:49:34 +0800 Subject: [PATCH] second commit #1789 update JobRegistryMonitorHelper.java, replace String with StringBuilder --- .../xxl/job/admin/core/thread/JobRegistryMonitorHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java index 5c23237d..64a6921d 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java @@ -66,10 +66,11 @@ public class JobRegistryMonitorHelper { String addressListStr = null; if (registryList!=null && !registryList.isEmpty()) { Collections.sort(registryList); - addressListStr = ""; + StringBuilder sb = new StringBuilder(); for (String item:registryList) { - addressListStr += item + ","; + sb.append(item).append(","); } + addressListStr = sb.toString(); addressListStr = addressListStr.substring(0, addressListStr.length()-1); } group.setAddressList(addressListStr);