Copilot commented on code in PR #19895: URL: https://github.com/apache/kafka/pull/19895#discussion_r2128310086
########## tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommand.java: ########## @@ -77,6 +89,8 @@ public static void run(StreamsGroupCommandOptions opts) { streamsGroupService.listGroups(); } else if (opts.options.has(opts.describeOpt)) { streamsGroupService.describeGroups(); + } else if (opts.options.has(opts.describeOpt)) { Review Comment: The delete-offsets branch is mistakenly checking opts.describeOpt instead of opts.deleteOffsetsOpt. Update the condition to use opts.deleteOffsetsOpt to properly distinguish the action. ```suggestion } else if (opts.options.has(opts.deleteOffsetsOpt)) { ``` ########## tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommand.java: ########## @@ -326,10 +469,40 @@ Map<TopicPartition, OffsetsInfo> getOffsets(StreamsGroupDescription description) return output; } + private Stream<TopicPartition> parseTopicsWithPartitions(String topicArg) { + ToIntFunction<String> partitionNum = partition -> { + try { + return Integer.parseInt(partition); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid partition '" + partition + "' specified in topic arg '" + topicArg + "''"); Review Comment: The error message in parseTopicsWithPartitions contains an extra single quote at the end. Consider correcting it to ensure the message is clear. ```suggestion throw new IllegalArgumentException("Invalid partition '" + partition + "' specified in topic arg '" + topicArg + "'"); ``` -- 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