vamossagar12 commented on code in PR #13131: URL: https://github.com/apache/kafka/pull/13131#discussion_r1083413458
########## core/src/main/scala/kafka/utils/ToolsUtils.scala: ########## @@ -64,4 +65,18 @@ object ToolsUtils { println(s"%-${maxLengthOfDisplayName}s : $specifier".format(metricName, value)) } } + + /** + * This is a simple wrapper around `CommandLineUtils.printUsageAndDie`. + * It is needed for tools migration (KAFKA-14525), as there is no Java equivalent for return type `Nothing`. + * Can be removed once [[kafka.admin.ConsumerGroupCommand]], [[kafka.tools.ConsoleConsumer]] + * and [[kafka.tools.ConsoleProducer]] are migrated. + * + * @param parser Command line options parser. + * @param message Error message. + */ + def printUsageAndDie(parser: OptionParser, message: String): Nothing = { Review Comment: I am thinking if we can add another parameter to this to say if we want to do an Exit(1) from this method or not. I see some places where Exit(1) is not being invoked from the the tools classes. WDYT? -- 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