This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new d8cf0f8b85 fix issue#14441 (#14441) (#14444)
d8cf0f8b85 is described below
commit d8cf0f8b85af44818db70b5f8afa30d565905c8f
Author: ligen <[email protected]>
AuthorDate: Tue Jul 4 16:20:14 2023 +0800
fix issue#14441 (#14441) (#14444)
alert-plugin-instances api, if no alert-plugin-instances, it will response
an empty list, but not null
Co-authored-by: ligen60 <[email protected]>
---
.../api/service/impl/AlertPluginInstanceServiceImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 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 d7c7581f11..8a77821453 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
@@ -243,16 +243,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<>();
alertPluginInstances.forEach(alertPluginInstance -> {
AlertPluginInstanceVO alertPluginInstanceVO = new
AlertPluginInstanceVO();