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/02/28 02:05:08 UTC

[GitHub] [dolphinscheduler] Yao-MR commented on a change in pull request #8552: [Impreove][Core]remove no meaningful duplicated check code

Yao-MR commented on a change in pull request #8552:
URL: https://github.com/apache/dolphinscheduler/pull/8552#discussion_r815536193



##########
File path: dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerService.java
##########
@@ -179,10 +179,6 @@ private void scheduleProcess() throws Exception {
     }
 
     private List<ProcessInstance> command2ProcessInstance(List<Command> commands) {
-        if (CollectionUtils.isEmpty(commands)) {
-            return null;
-        }
-
         List<ProcessInstance> processInstances = new ArrayList<>(commands.size());

Review comment:
       first we know the function is for transform the command to process instance,
   so we assue the command is not null, and also the we can know that the function who call the command2ProcessInstance have the predicate that the command is null or not null
   
   ![image](https://user-images.githubusercontent.com/8596901/155912368-d66b2b6e-375d-478d-b135-fe456f8e1e36.png)
   
   
   
   
   




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