mimaison commented on code in PR #15877: URL: https://github.com/apache/kafka/pull/15877#discussion_r1598182787
########## clients/src/test/java/org/apache/kafka/common/header/internals/RecordHeadersTest.java: ########## @@ -220,9 +220,7 @@ public void shouldThrowNpeWhenAddingCollectionWithNullHeader() { private int getCount(Headers headers) { int count = 0; - Iterator<Header> headerIterator = headers.iterator(); - while (headerIterator.hasNext()) { - headerIterator.next(); + for (Header ignore : headers) { Review Comment: Nice suggestion -- 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