mjsax commented on code in PR #19616:
URL: https://github.com/apache/kafka/pull/19616#discussion_r2071073135
##########
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:
Yes, `topic()` returns a string. Cf the comment though -- it's really just
about calling `topic()` to begin with... so the check does not really matter
anyway.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]