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 2018/02/07 09:29:29 UTC

[GitHub] rdhabalia commented on a change in pull request #1195: Ensure the checksum is not stripped after validation in the broker

rdhabalia commented on a change in pull request #1195: Ensure the checksum is not stripped after validation in the broker
URL: https://github.com/apache/incubator-pulsar/pull/1195#discussion_r166560354
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java
 ##########
 @@ -168,11 +168,11 @@ public void publishMessage(long producerId, long sequenceId, ByteBuf headersAndP
     }
 
     private boolean verifyChecksum(ByteBuf headersAndPayload) {
-
         if (hasChecksum(headersAndPayload)) {
-            int checksum = readChecksum(headersAndPayload).intValue();
             int readerIndex = headersAndPayload.readerIndex();
+
             try {
+                int checksum = readChecksum(headersAndPayload).intValue();
 
 Review comment:
   hmm.. :-(

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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