diff --git a/core/api/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java b/core/api/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java index 6f044f986..0f667ca0f 100644 --- a/core/api/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java +++ b/core/api/src/main/java/com/alipay/sofa/rpc/config/UserThreadPoolManager.java @@ -81,9 +81,7 @@ public static UserThreadPool getUserThread(String service) { public static Set getUserThreadPoolSet() { Set userThreadPoolSet = new HashSet<>(); if (hasUserThread()) { - for (UserThreadPool userThreadPool : userThreadMap.values()) { - userThreadPoolSet.add(userThreadPool); - } + userThreadPoolSet.addAll(userThreadMap.values()); } return userThreadPoolSet; }