aljoscha commented on a change in pull request #11702:
URL: https://github.com/apache/flink/pull/11702#discussion_r414457242



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/cli/ProgramOptions.java
##########
@@ -152,6 +112,26 @@ public ProgramOptions(CommandLine line) throws 
CliArgsException {
                this.savepointSettings = 
CliFrontendParser.createSavepointRestoreSettings(line);
        }
 
+       protected String[] extractProgramArgs(CommandLine line) {
+               String[] args = line.hasOption(ARGS_OPTION.getOpt()) ?
+                       line.getOptionValues(ARGS_OPTION.getOpt()) :
+                       line.getArgs();
+
+               if (args.length > 0 && !line.hasOption(JAR_OPTION.getOpt())) {
+                       jarFilePath = args[0];
+                       args = Arrays.copyOfRange(args, 1, args.length);
+               }
+
+               return args;
+       }
+
+       public void validate() throws CliArgsException {
+               // Java program should be specified a JAR file
+               if (getJarFilePath() == null) {
+                       throw new CliArgsException("Java program should be 
specified a JAR file.");

Review comment:
       I see, then leave it as is.




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


Reply via email to