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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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

1 participant