joshua2519 commented on code in PR #20293: URL: https://github.com/apache/kafka/pull/20293#discussion_r2374756512
########## tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommand.java: ########## @@ -83,27 +85,46 @@ public class StreamsGroupCommand { static final String MISSING_COLUMN_VALUE = "-"; public static void main(String[] args) { - StreamsGroupCommandOptions opts = new StreamsGroupCommandOptions(args); + Exit.exit(execute(args)); + } + + public static int execute(String[] args) { + StreamsGroupCommandOptions opts = null; + int exitCode = 0; try { - opts.checkArgs(); + opts = new StreamsGroupCommandOptions(args); + Objects.requireNonNull(opts).checkArgs(); // should have exactly one action long numberOfActions = Stream.of( - opts.listOpt, - opts.describeOpt, - opts.resetOffsetsOpt, - opts.deleteOpt, - opts.deleteOffsetsOpt + opts.listOpt, + opts.describeOpt, + opts.resetOffsetsOpt, + opts.deleteOpt, + opts.deleteOffsetsOpt Review Comment: reverted -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org