frankvicky commented on code in PR #18868: URL: https://github.com/apache/kafka/pull/18868#discussion_r1952566153
########## clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java: ########## @@ -457,7 +457,7 @@ public boolean isConnectionSetupTimeout(String id, long now) { public List<String> nodesWithConnectionSetupTimeout(long now) { return connectingNodes.stream() .filter(id -> isConnectionSetupTimeout(id, now)) - .collect(Collectors.toList()); + .toList(); Review Comment: Yes. We couldn't invoke `toList()` in modules that still use Java 11. Please refer to the following: https://github.com/apache/kafka/blob/c70b7c4b9e6fbd805d9a229b4ac13c1e10016d76/build.gradle#L52 -- 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