gmethvin commented on a change in pull request #9440:
URL: https://github.com/apache/pulsar/pull/9440#discussion_r569154763



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageIdImpl.java
##########
@@ -63,17 +78,17 @@ public int getPartitionIndex() {
 
     @Override
     public int hashCode() {
-        return (int) (31 * (ledgerId + 31 * entryId) + partitionIndex);
+        return Objects.hash(ledgerId, entryId, partitionIndex, batchIndex);

Review comment:
       It seems like `Objects.hash` is used elsewhere in the codebase and I 
generally prefer it to manually implementing `hashCode`, but I don't have a 
strong opinion. Happy to change it back.




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


Reply via email to