SbloodyS commented on code in PR #14199:
URL: 
https://github.com/apache/dolphinscheduler/pull/14199#discussion_r1205074538


##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java:
##########
@@ -306,12 +306,16 @@ public void init(String host, Date startTime, String 
executePath) {
     }
 
     public DependentParameters getDependency() {
-        if (this.dependency == null) {
+        if (this.dependency == null && 
TASK_TYPE_DEPENDENT.equalsIgnoreCase(this.taskType)) {
             Map<String, Object> taskParamsMap =
                     JSONUtils.parseObject(this.getTaskParams(), new 
TypeReference<Map<String, Object>>() {
                     });
+            Object dependence = taskParamsMap.get(Constants.DEPENDENCE);
+            if (dependence == null) {
+                return null;
+            }

Review Comment:
   Returning null in here may cause NPE in the downstream stage. We should find 
a way to avoid this. cc @ruanwenjun 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to