Browse Source

merge from 1.3.3-release

pull/3/MERGE
baoliang 4 years ago
parent
commit
67baba271e
  1. 5
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java

5
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java

@ -236,6 +236,10 @@ public class ProcessDefinitionServiceImpl extends BaseService implements
private String getResourceIds(ProcessData processData) { private String getResourceIds(ProcessData processData) {
List<TaskNode> tasks = processData.getTasks(); List<TaskNode> tasks = processData.getTasks();
Set<Integer> resourceIds = new HashSet<>(); Set<Integer> resourceIds = new HashSet<>();
StringBuilder sb = new StringBuilder();
if (CollectionUtils.isEmpty(tasks)) {
return sb.toString();
}
for (TaskNode taskNode : tasks) { for (TaskNode taskNode : tasks) {
String taskParameter = taskNode.getParams(); String taskParameter = taskNode.getParams();
AbstractParameters params = TaskParametersUtils.getParameters(taskNode.getType(), taskParameter); AbstractParameters params = TaskParametersUtils.getParameters(taskNode.getType(), taskParameter);
@ -249,7 +253,6 @@ public class ProcessDefinitionServiceImpl extends BaseService implements
} }
} }
StringBuilder sb = new StringBuilder();
for (int i : resourceIds) { for (int i : resourceIds) {
if (sb.length() > 0) { if (sb.length() > 0) {
sb.append(","); sb.append(",");

Loading…
Cancel
Save