[ 
https://issues.apache.org/jira/browse/FLINK-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311328#comment-16311328
 ] 

ASF GitHub Bot commented on FLINK-8338:
---------------------------------------

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

    https://github.com/apache/flink/pull/5224#discussion_r159640707
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontendParser.java 
---
    @@ -448,68 +397,31 @@ public static RunOptions parseRunCommand(String[] 
args) throws CliArgsException
                }
        }
     
    -   public static ListOptions parseListCommand(String[] args) throws 
CliArgsException {
    -           try {
    -                   DefaultParser parser = new DefaultParser();
    -                   CommandLine line = parser.parse(LIST_OPTIONS, args, 
false);
    -                   return new ListOptions(line);
    -           }
    -           catch (ParseException e) {
    -                   throw new CliArgsException(e.getMessage());
    -           }
    -   }
    -
    -   public static CancelOptions parseCancelCommand(String[] args) throws 
CliArgsException {
    -           try {
    -                   DefaultParser parser = new DefaultParser();
    -                   CommandLine line = parser.parse(CANCEL_OPTIONS, args, 
false);
    -                   return new CancelOptions(line);
    -           }
    -           catch (ParseException e) {
    -                   throw new CliArgsException(e.getMessage());
    -           }
    -   }
    +   public static CommandLine parse(Options options, String[] args, boolean 
stopAtNonOptions) throws CliArgsException {
    +           final DefaultParser parser = new DefaultParser();
     
    -   public static StopOptions parseStopCommand(String[] args) throws 
CliArgsException {
                try {
    -                   DefaultParser parser = new DefaultParser();
    -                   CommandLine line = parser.parse(STOP_OPTIONS, args, 
false);
    -                   return new StopOptions(line);
    +                   return parser.parse(options, args, stopAtNonOptions);
                } catch (ParseException e) {
                        throw new CliArgsException(e.getMessage());
                }
        }
     
    -   public static SavepointOptions parseSavepointCommand(String[] args) 
throws CliArgsException {
    -           try {
    -                   DefaultParser parser = new DefaultParser();
    -                   CommandLine line = parser.parse(SAVEPOINT_OPTIONS, 
args, false);
    -                   return new SavepointOptions(line);
    -           }
    -           catch (ParseException e) {
    -                   throw new CliArgsException(e.getMessage());
    -           }
    -   }
    +   static Options mergeOptions(Options optionsA, Options optionsB) {
    --- End diff --
    
    nit: Missing `@Nullable` on parameters & Javadoc
      


> Make CustomCommandLines non static in CliFrontend
> -------------------------------------------------
>
>                 Key: FLINK-8338
>                 URL: https://issues.apache.org/jira/browse/FLINK-8338
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Client
>    Affects Versions: 1.5.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>              Labels: flip-6
>             Fix For: 1.5.0
>
>
> For better testability and maintainability we should make the 
> {{CustomCommandLine}} registration non-static in {{CliFrontend}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to