Skip to content

Comments

fix: RecordType.hashCode() inconsistent with equals() (#694)#695

Open
mattpapp wants to merge 1 commit intoapache:mainfrom
mattpapp:fix/recordtype-hashcode-equals-contract
Open

fix: RecordType.hashCode() inconsistent with equals() (#694)#695
mattpapp wants to merge 1 commit intoapache:mainfrom
mattpapp:fix/recordtype-hashcode-equals-contract

Conversation

@mattpapp
Copy link

Fixes #694

hashCode() was using identity hash for the fieldNames array instead of content hash, while equals() correctly uses Arrays.equals(). Wrapped it with Arrays.hashCode() and added a test.

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.

bug: RecordType.hashCode() violates equals/hashCode contract

1 participant