From df2dcae4ed0dce12bfc210b5072e75f36b53f586 Mon Sep 17 00:00:00 2001 From: Wang Chengming <634749869@qq.com> Date: Thu, 29 Feb 2024 18:03:07 +0800 Subject: [PATCH] optimize UserThreadPoolManager (#1390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 呈铭 --- .../com/alipay/sofa/rpc/config/UserThreadPoolManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }