Skip to content

Document hashCode/equals stability requirement for InstanceContent and Lookup#9291

Open
hxreborn wants to merge 1 commit intoapache:masterfrom
hxreborn:doc/9270-instancecontent-hashcode-stability
Open

Document hashCode/equals stability requirement for InstanceContent and Lookup#9291
hxreborn wants to merge 1 commit intoapache:masterfrom
hxreborn:doc/9270-instancecontent-hashcode-stability

Conversation

@hxreborn
Copy link
Copy Markdown

Added javadoc notes to InstanceContent and Lookup about hashCode/equals stability. Same contract as HashMap/HashSet, just wasn't called out.

Closes #9270

Objects with mutable hashCode/equals can cause silent removal failures
in AbstractLookup when storage switches to hash-based InheritanceTree.
Document the constraint, matching the general contract of HashMap.

Closes apache#9270
@neilcsmith-net neilcsmith-net added Platform [ci] enable platform tests (platform/*) ci:no-build [ci] disable CI pipeline labels Mar 29, 2026
Copy link
Copy Markdown
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@neilcsmith-net neilcsmith-net added this to the NB30 milestone Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-build [ci] disable CI pipeline Platform [ci] enable platform tests (platform/*)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InstanceContent.remove(obj) fails if obj has mutated and lookup contains 12+ items

2 participants