From 571c5daeb75b85ab6fe37dc603757cebf530f82e Mon Sep 17 00:00:00 2001 From: zhangyu6k Date: Mon, 19 Jun 2023 07:50:56 +0000 Subject: [PATCH] =?UTF-8?q?update=20GroupVersionCache.java=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E7=94=B1?= =?UTF-8?q?=E4=BA=8EconfigDTO=E6=B2=A1=E6=9C=89=E5=80=BC=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E9=80=A0=E6=88=90=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangyu6k --- .../easy/retry/client/core/cache/GroupVersionCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easy-retry-client-core/src/main/java/com/aizuda/easy/retry/client/core/cache/GroupVersionCache.java b/easy-retry-client-core/src/main/java/com/aizuda/easy/retry/client/core/cache/GroupVersionCache.java index a00d1bd87..df64fb141 100644 --- a/easy-retry-client-core/src/main/java/com/aizuda/easy/retry/client/core/cache/GroupVersionCache.java +++ b/easy-retry-client-core/src/main/java/com/aizuda/easy/retry/client/core/cache/GroupVersionCache.java @@ -38,6 +38,10 @@ public class GroupVersionCache implements Lifecycle { } public static long getDdl(String sceneName) { + // 缓存初始化时configDTO值为null,可能造成空指针异常 + if (Objects.isNull(configDTO)){ + return SystemConstants.DEFAULT_DDL; + } List sceneList = configDTO.getSceneList(); if (CollectionUtils.isEmpty(sceneList)) { return SystemConstants.DEFAULT_DDL;