代码格式化

代码格式化
pull/191/head
hushtian 3 years ago committed by GitHub
parent 353efa16b5
commit 3239e1d6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -123,7 +123,7 @@ public class ServerThreadPoolDynamicRefresh implements ThreadPoolDynamicRefresh
* @param parameter * @param parameter
*/ */
public void changePoolInfo(ThreadPoolExecutor executor, PoolParameter parameter) { public void changePoolInfo(ThreadPoolExecutor executor, PoolParameter parameter) {
if (parameter.getCoreSize() != null&&parameter.getMaxSize() !=null) { if (parameter.getCoreSize() != null && parameter.getMaxSize() != null) {
if (parameter.getMaxSize() < executor.getMaximumPoolSize()) { if (parameter.getMaxSize() < executor.getMaximumPoolSize()) {
executor.setCorePoolSize(parameter.getCoreSize()); executor.setCorePoolSize(parameter.getCoreSize());
executor.setMaximumPoolSize(parameter.getMaxSize()); executor.setMaximumPoolSize(parameter.getMaxSize());
@ -131,7 +131,7 @@ public class ServerThreadPoolDynamicRefresh implements ThreadPoolDynamicRefresh
executor.setMaximumPoolSize(parameter.getMaxSize()); executor.setMaximumPoolSize(parameter.getMaxSize());
executor.setCorePoolSize(parameter.getCoreSize()); executor.setCorePoolSize(parameter.getCoreSize());
} }
}else { } else {
if (parameter.getMaxSize() != null) { if (parameter.getMaxSize() != null) {
executor.setMaximumPoolSize(parameter.getMaxSize()); executor.setMaximumPoolSize(parameter.getMaxSize());
} }

Loading…
Cancel
Save