ableegoldman commented on code in PR #19616:
URL: https://github.com/apache/kafka/pull/19616#discussion_r2071070585


##########
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:
   i don't think this is the same thing, the old check was `>=` not just `>` -- 
if anything it seems like we should remove the entire part of the conditional 
because isn't `length() >= 0` trivially true? what is the topic, a string?



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