From 2668689990bbb4e63b1e6f216097a4271d505b02 Mon Sep 17 00:00:00 2001 From: klsq94 Date: Tue, 26 Jul 2022 15:20:53 +0800 Subject: [PATCH] Fixed #399 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 配置中心未配置线程池启动报错,增加判空,提前返回 --- .../core/springboot/starter/notify/CoreNotifyConfigBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/notify/CoreNotifyConfigBuilder.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/notify/CoreNotifyConfigBuilder.java index d5457a0d..6818afda 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/notify/CoreNotifyConfigBuilder.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/notify/CoreNotifyConfigBuilder.java @@ -56,7 +56,7 @@ public class CoreNotifyConfigBuilder implements NotifyConfigBuilder { boolean globalAlarm = bootstrapCoreProperties.getAlarm(); List executors = bootstrapCoreProperties.getExecutors(); 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; } List actual = executors.stream().filter(each -> Optional.ofNullable(each.getNotify()).map(notify -> notify.getIsAlarm()).orElse(false)).collect(Collectors.toList());