szetszwo commented on pull request #3340:
URL: https://github.com/apache/hadoop/pull/3340#issuecomment-917324293
@cnauroth , thanks a lot for helping out.
> ... Inodes with identical ACL entries all point to the same AclFeature, so
reference equals should work fine. ...
In this case, it is a good idea to check == inside the equals(Object)
method. Then, calling equals(Object) is equally cheap as checking ==.
```
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/AclFeature.java
@@ -63,6 +63,9 @@ int getEntryAt(int pos) {
@Override
public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
if (o == null) {
return false;
}
```
Let's merge this change as-is and do the further improvement separately.
+1
@bshashikant , it somehow got "All checks have failed". Could you trigger
another build?
--
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]