fix: 配置中心未配置线程池启动报错,增加判空,提前返回
pull/400/head
klsq94 2 years ago
parent f0291ec027
commit 2668689990

@ -56,7 +56,7 @@ public class CoreNotifyConfigBuilder implements NotifyConfigBuilder {
boolean globalAlarm = bootstrapCoreProperties.getAlarm(); boolean globalAlarm = bootstrapCoreProperties.getAlarm();
List<ExecutorProperties> executors = bootstrapCoreProperties.getExecutors(); List<ExecutorProperties> executors = bootstrapCoreProperties.getExecutors();
if (CollectionUtil.isEmpty(executors)) { if (CollectionUtil.isEmpty(executors)) {
log.error("Failed to buildNotify,executors configuration is empty"); log.warn("Failed to build notify, executors configuration is empty.");
return resultMap; return resultMap;
} }
List<ExecutorProperties> actual = executors.stream().filter(each -> Optional.ofNullable(each.getNotify()).map(notify -> notify.getIsAlarm()).orElse(false)).collect(Collectors.toList()); List<ExecutorProperties> actual = executors.stream().filter(each -> Optional.ofNullable(each.getNotify()).map(notify -> notify.getIsAlarm()).orElse(false)).collect(Collectors.toList());

Loading…
Cancel
Save