sodonnel commented on code in PR #6779:
URL: https://github.com/apache/ozone/pull/6779#discussion_r1630888820


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/BlockID.java:
##########
@@ -120,13 +157,13 @@ public boolean equals(Object o) {
     }
     BlockID blockID = (BlockID) o;
     return containerBlockID.equals(blockID.getContainerBlockID())
-        && blockCommitSequenceId == blockID.getBlockCommitSequenceId();
+        && blockCommitSequenceId == blockID.getBlockCommitSequenceId()
+        && Objects.equals(replicaIndex, blockID.getReplicaIndex());

Review Comment:
   Looks like Objects.equals handles it as you would expect:
   
   > If both objects are null it will return true, if one is null and another 
isn't it will return false. Otherwise it will return the result of calling 
[equals](http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals%28java.lang.Object%29)
 on the first object with the second as argument.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to