From 7973c2fe2d44a80ffe169f8c564da1867cb45a25 Mon Sep 17 00:00:00 2001 From: DDDreame Date: Thu, 11 May 2023 00:42:15 +0800 Subject: [PATCH] fix checkType errors about module hippo4j-adapter-dubbo. --- .../alibaba/dubbo/AlibabaDubboThreadPoolAdapter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hippo4j-adapter/hippo4j-adapter-alibaba-dubbo/src/main/java/cn/hippo4j/adapter/alibaba/dubbo/AlibabaDubboThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-alibaba-dubbo/src/main/java/cn/hippo4j/adapter/alibaba/dubbo/AlibabaDubboThreadPoolAdapter.java index 2eb12e3d..2209089e 100644 --- a/hippo4j-adapter/hippo4j-adapter-alibaba-dubbo/src/main/java/cn/hippo4j/adapter/alibaba/dubbo/AlibabaDubboThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-alibaba-dubbo/src/main/java/cn/hippo4j/adapter/alibaba/dubbo/AlibabaDubboThreadPoolAdapter.java @@ -42,7 +42,7 @@ import static cn.hippo4j.common.constant.ChangeThreadPoolConstants.CHANGE_DELIMI @Slf4j public class AlibabaDubboThreadPoolAdapter implements ThreadPoolAdapter, ApplicationListener { - private final Map DUBBO_PROTOCOL_EXECUTOR = new HashMap<>(); + private final Map dubboProtocolExecutor = new HashMap<>(); @Override public String mark() { @@ -52,7 +52,7 @@ public class AlibabaDubboThreadPoolAdapter implements ThreadPoolAdapter, Applica @Override public ThreadPoolAdapterState getThreadPoolState(String identify) { ThreadPoolAdapterState threadPoolAdapterState = new ThreadPoolAdapterState(); - ThreadPoolExecutor executor = DUBBO_PROTOCOL_EXECUTOR.get(identify); + ThreadPoolExecutor executor = dubboProtocolExecutor.get(identify); if (executor == null) { log.warn("[{}] Alibaba Dubbo consuming thread pool not found.", identify); return threadPoolAdapterState; @@ -66,14 +66,14 @@ public class AlibabaDubboThreadPoolAdapter implements ThreadPoolAdapter, Applica @Override public List getThreadPoolStates() { List threadPoolAdapterStates = new ArrayList<>(); - DUBBO_PROTOCOL_EXECUTOR.forEach((key, val) -> threadPoolAdapterStates.add(getThreadPoolState(String.valueOf(key)))); + dubboProtocolExecutor.forEach((key, val) -> threadPoolAdapterStates.add(getThreadPoolState(String.valueOf(key)))); return threadPoolAdapterStates; } @Override public boolean updateThreadPool(ThreadPoolAdapterParameter threadPoolAdapterParameter) { String threadPoolKey = threadPoolAdapterParameter.getThreadPoolKey(); - ThreadPoolExecutor executor = DUBBO_PROTOCOL_EXECUTOR.get(threadPoolAdapterParameter.getThreadPoolKey()); + ThreadPoolExecutor executor = dubboProtocolExecutor.get(threadPoolAdapterParameter.getThreadPoolKey()); if (executor == null) { log.warn("[{}] Alibaba Dubbo consuming thread pool not found.", threadPoolKey); return false; @@ -94,7 +94,7 @@ public class AlibabaDubboThreadPoolAdapter implements ThreadPoolAdapter, Applica try { DataStore dataStore = ExtensionLoader.getExtensionLoader(DataStore.class).getDefaultExtension(); Map executors = dataStore.get(poolKey); - executors.forEach((key, value) -> DUBBO_PROTOCOL_EXECUTOR.put(key, (ThreadPoolExecutor) value)); + executors.forEach((key, value) -> dubboProtocolExecutor.put(key, (ThreadPoolExecutor) value)); } catch (Exception ex) { log.error("Failed to get Alibaba Dubbo protocol thread pool", ex); }