Browse Source

[fix][master]: fix condition npe (#10478)

* [fix][master]: fix condition npe

* [fix][master]: fix condition npe

Co-authored-by: huaangcg <huangcg@getui.com>
3.1.0-release
chuxing 2 years ago committed by GitHub
parent
commit
0dd6f4008e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java

5
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java

@ -39,6 +39,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Optional;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.slf4j.Logger;
@ -375,9 +376,13 @@ public class DagHelper {
} else {
conditionTaskList.add(nodeCode);
}
// the skipNodeList maybe null if no next task
skipNodeList = Optional.ofNullable(skipNodeList).orElse(new ArrayList<>());
for (String failedNode : skipNodeList) {
setTaskNodeSkip(failedNode, dag, completeTaskList, skipTaskNodeList);
}
// the conditionTaskList maybe null if no next task
conditionTaskList = Optional.ofNullable(conditionTaskList).orElse(new ArrayList<>());
return conditionTaskList;
}

Loading…
Cancel
Save