Parkerhiphop commented on code in PR #19213: URL: https://github.com/apache/kafka/pull/19213#discussion_r2008760783
########## tools/src/main/java/org/apache/kafka/tools/ClientMetricsCommand.java: ########## @@ -367,6 +368,16 @@ public void checkArgs() { if (has(alterOpt)) { if ((isNamePresent && has(generateNameOpt)) || (!isNamePresent && !has(generateNameOpt))) throw new IllegalArgumentException("One of --name or --generate-name must be specified with --alter."); + + interval().ifPresent(intervalStr -> { + if (!intervalStr.isEmpty()) { + try { + Integer.parseInt(intervalStr); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid interval value. Must be a valid integer or empty to delete the setting."); Review Comment: @apoorvmittal10 Thanks for the suggestion! Instead of vaguely stating that it should be a valid integer or empty, the new message clearly specifies that it must be an integer or left empty to delete. Since empty values now reset the interval to its default value (as shown in the previous screenshot), I think we can explicitly say “reset” here. What do you think? -- 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