kirktrue commented on code in PR #19917: URL: https://github.com/apache/kafka/pull/19917#discussion_r2150944599
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/CompletableEventReaper.java: ########## @@ -166,9 +161,48 @@ public boolean contains(CompletableEvent<?> event) { } public List<CompletableEvent<?>> uncompletedEvents() { - return tracked.stream() - .filter(e -> !e.future().isDone()) - .collect(Collectors.toList()); + List<CompletableEvent<?>> events = new ArrayList<>(); + + for (CompletableEvent<?> event : tracked) { Review Comment: Agreed. I added one here and similar comments in a few other places. -- 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