This is an automated email from the ASF dual-hosted git repository. kerwin pushed a commit to branch 3.1.8-prepare in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit 475cf662292116418d1ba290dd90617e87f3b9ed Author: ligen <[email protected]> AuthorDate: Tue Jul 4 16:20:14 2023 +0800 cherry-pick [Fix-14441] [Bug] [Alarm Instance Manage] Search result list error #14444 --- .../api/service/impl/AlertPluginInstanceServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertPluginInstanceServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertPluginInstanceServiceImpl.java index f4173dff47..48eb476aad 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertPluginInstanceServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertPluginInstanceServiceImpl.java @@ -229,15 +229,16 @@ public class AlertPluginInstanceServiceImpl extends BaseServiceImpl implements A } private List<AlertPluginInstanceVO> buildPluginInstanceVOList(List<AlertPluginInstance> alertPluginInstances) { + List<AlertPluginInstanceVO> alertPluginInstanceVOS = new ArrayList<>(); if (CollectionUtils.isEmpty(alertPluginInstances)) { - return null; + return alertPluginInstanceVOS; } List<PluginDefine> pluginDefineList = pluginDefineMapper.queryAllPluginDefineList(); if (CollectionUtils.isEmpty(pluginDefineList)) { - return null; + return alertPluginInstanceVOS; } - Map<Integer, PluginDefine> pluginDefineMap = pluginDefineList.stream().collect(Collectors.toMap(PluginDefine::getId, Function.identity())); - List<AlertPluginInstanceVO> alertPluginInstanceVOS = new ArrayList<>(); + Map<Integer, PluginDefine> pluginDefineMap = + pluginDefineList.stream().collect(Collectors.toMap(PluginDefine::getId, Function.identity())); alertPluginInstances.forEach(alertPluginInstance -> { AlertPluginInstanceVO alertPluginInstanceVO = new AlertPluginInstanceVO();
