Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly combine hash codes for repeated enums. #556

Merged
merged 1 commit into from Apr 21, 2022

Conversation

LorenVS
Copy link
Contributor

@LorenVS LorenVS commented Nov 12, 2021

The existing logic in hashField is overriding the previously computed hash codes, which could include values from other fields within the message. Any message with a repeated enum field with a (relatively) high tag number will generate a poor hash code which doesn't reflect other fields.

The existing logic in `hashField` is overriding the previously computed
hash codes, which could include values from other fields within the
message. Any message with a repeated enum field with a (relatively) high
tag number will generate a poor hash code which doesn't reflect other
fields.
@google-cla google-cla bot added the cla: yes label Nov 12, 2021
Copy link
Contributor

@rakudrama rakudrama left a comment

Choose a reason for hiding this comment

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

LGTM

@LorenVS LorenVS closed this Nov 12, 2021
@LorenVS LorenVS reopened this Nov 12, 2021
@osa1 osa1 merged commit 4ec722a into google:master Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants