ijuma commented on code in PR #12365:
URL: https://github.com/apache/kafka/pull/12365#discussion_r923943042
##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -1491,20 +1495,25 @@ public void setPartition(int partition) {
if (log.isTraceEnabled()) {
Review Comment:
Correct @junrao, `Objects.requireNonNull` would be the recommended way to
assert non null. The reference equality check is less common, we could add our
own utility method in Utils for that or inline it.
The main thing is to get the appropriate signal if this happens in prod when
the cost is low (both examples would be in that category).
--
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]