You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/23 22:48:24 UTC

[GitHub] [pulsar] dlg99 opened a new issue #10022: MessageImpl is out of sync with the documented behavior of Message

dlg99 opened a new issue #10022:
URL: https://github.com/apache/pulsar/issues/10022


   **Describe the bug**
   
   MessageImpl is out of sync with the documented behavior
   
   ```
   public interface Message<T> {
   ...
       /**
        * Get the unique message ID associated with this message.
        *
        * <p>The message id can be used to univocally refer to a message without having the keep
        * the entire payload in memory.
        *
        * <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
        */
       MessageId getMessageId();
   ``` 
   note `return the message id null if ...`
   and then check
   
   ```
   public class MessageImpl<T> implements Message<T> {
   ...
       @Override
       public MessageId getMessageId() {
           checkNotNull(messageId, "Cannot get the message id of a message that was not received");
           return messageId;
       }
   ```    
      
   note `checkNotNull`
       
   **Expected behavior**
   
   Actual behavior to match documented behavior (one of these has to change). 
   
   


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang commented on issue #10022: MessageImpl is out of sync with the documented behavior of Message

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on issue #10022:
URL: https://github.com/apache/pulsar/issues/10022#issuecomment-809065567


   @codelipenghui thank you for your confirmation.
   @dlg99 thank you for fixing it.


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang commented on issue #10022: MessageImpl is out of sync with the documented behavior of Message

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on issue #10022:
URL: https://github.com/apache/pulsar/issues/10022#issuecomment-807917932


   @codelipenghui could you please help confirm which behavior is correct? Thank you.


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] eolivelli closed issue #10022: MessageImpl is out of sync with the documented behavior of Message

Posted by GitBox <gi...@apache.org>.
eolivelli closed issue #10022:
URL: https://github.com/apache/pulsar/issues/10022


   


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #10022: MessageImpl is out of sync with the documented behavior of Message

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #10022:
URL: https://github.com/apache/pulsar/issues/10022#issuecomment-809049374


   @Jennifer88huang The document is correct, @dlg99 already push out a PR #10025  to fix the code part,


-- 
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:
users@infra.apache.org