Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5224#discussion_r159451928
--- Diff:
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontendParser.java
---
@@ -391,35 +353,22 @@ public static void printHelpForSavepoint() {
formatter.setSyntaxPrefix(" \"savepoint\" action options:");
formatter.printHelp(" ",
getSavepointOptionsWithoutDeprecatedOptions(new Options()));
- printCustomCliOptions(formatter, false);
+ printCustomCliOptions(customCommandLines, formatter, false);
System.out.println();
}
- /**
- * Adds custom cli options.
- * @param options The options to add options to
- * @param runOptions Whether to include run options
- * @return Options with additions
- */
- private static Options addCustomCliOptions(Options options, boolean
runOptions) {
- for (CustomCommandLine cli:
CliFrontend.getCustomCommandLineList()) {
- cli.addGeneralOptions(options);
- if (runOptions) {
- cli.addRunOptions(options);
- }
- }
- return options;
- }
-
/**
* Prints custom cli options.
* @param formatter The formatter to use for printing
* @param runOptions True if the run options should be printed, False
to print only general options
*/
- private static void printCustomCliOptions(HelpFormatter formatter,
boolean runOptions) {
+ private static void printCustomCliOptions(
+ Collection<CustomCommandLine<?>> customCommandLines,
--- End diff --
nit: indentation
---