You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/27 01:34:23 UTC
[GitHub] [dolphinscheduler] fuchanghai commented on a diff in pull request #12130: [Improve][Service] code clean in the Service module
fuchanghai commented on code in PR #12130:
URL: https://github.com/apache/dolphinscheduler/pull/12130#discussion_r980645763
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -1150,7 +1153,8 @@ private void initComplementDataParam(ProcessDefinition processDefinition,
complementDate = CronUtils.getSelfScheduleDateList(cmdParam);
}
- if (complementDate.size() > 0 && Flag.NO == processInstance.getIsSubProcess()) {
+ if (complementDate != null && complementDate.size() > 0 && Flag.NO == processInstance
Review Comment:
I am used to use ``` CollectionUtils.isEmpty(complementDate) && Flag.NO == processInstance ``` to make this judgment.
it looks like it will make the code more concise ,The code logic of this method is as follows:
```
public static boolean isEmpty(Collection coll) {
return coll == null || coll.isEmpty();
}
```
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org