LuciferYang opened a new issue, #13413: URL: https://github.com/apache/gravitino/issues/13413
**What would you like to be improved?** `RoleEntity.equals` compares `securableObjects` with `CollectionUtils.isEqualCollection` (order-independent, bag semantics), but `hashCode` hashes the `List` directly, which is order-sensitive. Two roles that are equal under `equals` but differ only in securable-object ordering get different hash codes, which violates the `Object.hashCode` contract and loses them in any `HashSet` or `HashMap`. **How should we improve?** Combine an order-independent sum of element hashes for `securableObjects` into `hashCode`, matching exactly the fields `equals` compares. -- 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]
