chia7712 commented on code in PR #19561: URL: https://github.com/apache/kafka/pull/19561#discussion_r2060532485
########## tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommand.java: ########## @@ -368,7 +368,11 @@ static boolean isGroupStateValid(GroupState state, int numRows) { private static Set<TopicPartition> getTopicPartitions(List<StreamsGroupMemberAssignment.TaskIds> taskIds, StreamsGroupDescription description) { Map<String, List<String>> allSourceTopics = new HashMap<>(); for (StreamsGroupSubtopologyDescription subtopologyDescription : description.subtopologies()) { - allSourceTopics.put(subtopologyDescription.subtopologyId(), subtopologyDescription.sourceTopics()); + List<String> topics = new ArrayList<>(subtopologyDescription.sourceTopics()); + if (!subtopologyDescription.repartitionSourceTopics().isEmpty()) { Review Comment: Excuse me, is it necessary to add an empty check? It seems to me that removing the empty check has no side effect, and it can avoid an extra map copy. -- 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