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
@mbien mbien added the JavaDoc [ci] enable java/javadoc tests and build-javadoc target label Mar 31, 2026
@mbien
Copy link
Copy Markdown
Member

mbien commented Mar 31, 2026

we usually ask to get the real name on the author field of the commit, but since this is "just" doc it might be ok? don't know.

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 JavaDoc [ci] enable java/javadoc tests and build-javadoc target 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

3 participants