Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6049#discussion_r192697261
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/cli/ListOptions.java ---
    @@ -28,20 +29,26 @@
      */
     public class ListOptions extends CommandLineOptions {
     
    -   private final boolean running;
    -   private final boolean scheduled;
    +   private final boolean showRunning;
    +   private final boolean showScheduled;
    +   private final boolean showAll;
     
        public ListOptions(CommandLine line) {
                super(line);
    -           this.running = line.hasOption(RUNNING_OPTION.getOpt());
    -           this.scheduled = line.hasOption(SCHEDULED_OPTION.getOpt());
    +           this.showAll = line.hasOption(ALL_OPTION.getOpt());
    +           this.showRunning = line.hasOption(RUNNING_OPTION.getOpt()) || 
this.showAll;
    +           this.showScheduled = line.hasOption(SCHEDULED_OPTION.getOpt()) 
|| this.showAll;
    --- End diff --
    
    I would prefer this class being a dumb getter and having the OR logic in 
CLIFrontend.
    This class is just a representation of what was configured, and I would 
leave the interpretation up to the using classes.


---

Reply via email to