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


##########
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:
   Without this check, JSONUtils.parseObject function will catch exception and 
return null, return value is also null



-- 
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