ableegoldman commented on code in PR #19616: URL: https://github.com/apache/kafka/pull/19616#discussion_r2071072286
########## clients/src/test/java/org/apache/kafka/clients/producer/internals/ProducerInterceptorsTest.java: ########## @@ -126,7 +126,7 @@ public void onAcknowledgement(RecordMetadata metadata, Exception exception, Head onErrorAckCount++; // the length check is just to call topic() method and let it throw an exception // if RecordMetadata.TopicPartition is null - if (metadata != null && metadata.topic().length() >= 0) { + if (metadata != null && !metadata.topic().isEmpty()) { Review Comment: kind of worried someone else might see this and miss the comment above like I did and end up removing what looks like a no-op check. can we take the `metadata.topic()` out of the conditional to make it more obvious? -- 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