chia7712 commented on code in PR #16250: URL: https://github.com/apache/kafka/pull/16250#discussion_r1632361233
########## clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java: ########## @@ -2760,9 +2760,12 @@ void handleFailure(Throwable throwable) { }, now); } - return new DescribeConfigsResult(new HashMap<>(nodeFutures.entrySet().stream() - .flatMap(x -> x.getValue().entrySet().stream()) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)))); + Map<ConfigResource, KafkaFuture<Config>> resourceToConfigFuture = nodeFutures.entrySet() Review Comment: why we need this temporary variable? the following style works on my local. ```java return new DescribeConfigsResult(nodeFutures.entrySet() .stream() .flatMap(x -> x.getValue().entrySet().stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); ``` -- 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