LuciferYang commented on PR #13219:
URL: https://github.com/apache/gravitino/pull/13219#issuecomment-5697359294

   Both points are valid and are addressed in 946bd5004:
   
   - `equals` now compares `metadataObject` and `locations` with 
`Objects.equals`, so `remove(obj, null)` no longer throws a 
`NullPointerException` on comparison.
   - the constructor stores `ImmutableList.copyOf(locations)`, so `locations` 
(which now participates in `hashCode`) is a stable, immutable hash key that the 
caller cannot mutate after construction.
   
   Added regression tests for both: equality with null `locations`, and 
`HashSet` membership staying stable after the caller mutates the list it passed 
to `remove(...)`.
   


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

Reply via email to