fmorg-git commented on code in PR #9214:
URL: https://github.com/apache/ozone/pull/9214#discussion_r2479628492
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/acl/OzoneObj.java:
##########
@@ -146,4 +147,23 @@ public Map<String, String> toAuditMap() {
return auditMap;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof OzoneObj)) {
Review Comment:
partial update - I made the modification to the `if (!(o instanceof
OzoneObj))` check.
However, I think the `OzoneObj` needs `getPath()` in the `equals()` and
`hashCode()`, otherwise two resources that point to different paths but the
same resource and store types (such as "/s3v/bucket1" and "/s3v/bucket2") would
be deemed equal, which violates logical equality. Also, if the `equals()` and
`hashCode()` don't include `getPath()`, then they wouldn't be consistent with
`toString()` and the serialization in `toProtobuf()`.
--
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]