apoorvmittal10 commented on code in PR #12782:
URL: https://github.com/apache/kafka/pull/12782#discussion_r1717296450
##########
clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java:
##########
@@ -177,12 +177,15 @@ public static PartitionInfo
toPartitionInfo(PartitionMetadata metadata, Map<Inte
}
private static Node[] convertToNodeArray(List<Integer> replicaIds,
Map<Integer, Node> nodesById) {
- return replicaIds.stream().map(replicaId -> {
+ Node[] nodes = new Node[replicaIds.size()];
+ for (int i = 0; i < replicaIds.size(); i++) {
+ Integer replicaId = replicaIds.get(i);
Review Comment:
Sounds good.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]