Technoboy- commented on a change in pull request #1719: fix bug sonar: add null 
check in daghelper
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/1719#discussion_r363137887
 
 

 ##########
 File path: 
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java
 ##########
 @@ -78,17 +78,17 @@
         List<String> startNodeList = startNodeNameList;
 
         if(taskDependType != TaskDependType.TASK_POST
-                && startNodeList.size() == 0){
+                && startNodeList.isEmpty()){
             logger.error("start node list is empty! cannot continue run the 
process ");
             return destFlowNodeList;
         }
         List<TaskNode> destTaskNodeList = new ArrayList<>();
         List<TaskNode> tmpTaskNodeList = new ArrayList<>();
         if (taskDependType == TaskDependType.TASK_POST
-                && recoveryNodeNameList.size() > 0) {
+                && !recoveryNodeNameList.isEmpty()) {
 
 Review comment:
   the same as upstairs

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to