AndrewJSchofield commented on code in PR #18868:
URL: https://github.com/apache/kafka/pull/18868#discussion_r1952318577


##########
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:
   If I understand correctly, `Stream.toList()` was introduced in Java 16. The 
clients build at Java 11, while the broker builds at Java 17. As a result, I 
don't think you can use `Stream.toList()` in the clients project.



-- 
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

Reply via email to