dlg99 commented on a change in pull request #10025:
URL: https://github.com/apache/pulsar/pull/10025#discussion_r600077556
##########
File path:
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Message.java
##########
@@ -81,7 +81,8 @@
*
* <p>Only messages received from the consumer will have a message id
assigned.
*
- * @return the message id null if this message was not received by this
client instance
+ * @return the message id
+ * @throws NullPointerException if the message is null (message was not
received by this client instance)
Review comment:
@merlimat I thought about doing that, but that assumes making sure that
null check is added where the getMessageId() is used (which is impossible that
the code outside of pulsar repo).
I can also simply remove checkNotNull and simply let the NPE happen
eventually someplace else but I'd love to have more than one voice for this
option.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]