update GroupVersionCache.java 修复空指针异常
修复初始化时由于configDTO没有值可能造成的空指针异常 Signed-off-by: zhangyu6k <zhangyu6k@gmail.com>
This commit is contained in:
parent
b348ba0b0a
commit
571c5daeb7
@ -38,6 +38,10 @@ public class GroupVersionCache implements Lifecycle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static long getDdl(String sceneName) {
|
public static long getDdl(String sceneName) {
|
||||||
|
// 缓存初始化时configDTO值为null,可能造成空指针异常
|
||||||
|
if (Objects.isNull(configDTO)){
|
||||||
|
return SystemConstants.DEFAULT_DDL;
|
||||||
|
}
|
||||||
List<Scene> sceneList = configDTO.getSceneList();
|
List<Scene> sceneList = configDTO.getSceneList();
|
||||||
if (CollectionUtils.isEmpty(sceneList)) {
|
if (CollectionUtils.isEmpty(sceneList)) {
|
||||||
return SystemConstants.DEFAULT_DDL;
|
return SystemConstants.DEFAULT_DDL;
|
||||||
|
Loading…
Reference in New Issue
Block a user