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>
(cherry picked from commit 0dd6f4008e)
3.0.0/version-upgrade
chuxing 2 years ago committed by Jiajie Zhong
parent
commit
a27a45fcfe
  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