fix: Change check order and The first line indentation (#614)

pull/650/head
pizihao 3 years ago
parent cfc830ff75
commit b6f02b6adc

@ -79,13 +79,16 @@ public class DynamicThreadPoolRefreshListener extends AbstractRefreshListener<Ex
List<ExecutorProperties> executors = bindableConfigProperties.getExecutors(); List<ExecutorProperties> executors = bindableConfigProperties.getExecutors();
for (ExecutorProperties properties : executors) { for (ExecutorProperties properties : executors) {
String threadPoolId = properties.getThreadPoolId(); String threadPoolId = properties.getThreadPoolId();
if (!match(properties) || !checkConsistency(threadPoolId, properties)) { if (!match(properties)) {
continue; continue;
} }
/* /*
* Check whether the notification configuration is consistent, this operation will not trigger the notification. * Check whether the notification configuration is consistent, this operation will not trigger the notification.
*/ */
checkNotifyConsistencyAndReplace(properties); checkNotifyConsistencyAndReplace(properties);
if (!checkConsistency(threadPoolId, properties)) {
continue;
}
dynamicRefreshPool(threadPoolId, properties); dynamicRefreshPool(threadPoolId, properties);
ExecutorProperties beforeProperties = GlobalCoreThreadPoolManage.getProperties(properties.getThreadPoolId()); ExecutorProperties beforeProperties = GlobalCoreThreadPoolManage.getProperties(properties.getThreadPoolId());
GlobalCoreThreadPoolManage.refresh(threadPoolId, failDefaultExecutorProperties(beforeProperties, properties)); GlobalCoreThreadPoolManage.refresh(threadPoolId, failDefaultExecutorProperties(beforeProperties, properties));

Loading…
Cancel
Save