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 2019/07/31 03:09:28 UTC

[GitHub] [pulsar] congbobo184 commented on a change in pull request #4848: Consumer can getValue return null

congbobo184 commented on a change in pull request #4848: Consumer can getValue return null
URL: https://github.com/apache/pulsar/pull/4848#discussion_r309023156
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
 ##########
 @@ -270,7 +270,11 @@ public T getValue() {
                     return schema.decode(getData(), schemaVersion);
                 }
             } else {
-                return schema.decode(getData());
+                if (getData().length == 0) {
 
 Review comment:
   Should we store the length of the payload, if we don't store it, we don't know the length of the payload

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


With regards,
Apache Git Services