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

Treat empty and uninitialized Maps the same in equality checks #638

Merged
merged 2 commits into from
May 4, 2022

Conversation

osa1
Copy link
Member

@osa1 osa1 commented May 3, 2022

Treat an empty Map the same as an uninitialized Map when performing equality
checks. This ensures that reading a map field does not alter the hashCode or
equality comparisons of the message itself.


Rebased version #591 with a regression test.


cl/304375641

agreaves and others added 2 commits May 3, 2022 13:56
Treat an empty Map the same as an uninitialized Map when performing
equality checks. This ensures that reading a map field does not alter
the hashCode or equality comparison of the message itself.
Copy link
Collaborator

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

Nice

LGTM

@osa1 osa1 merged commit d30623b into google:master May 4, 2022
@osa1 osa1 deleted the map_equality branch May 4, 2022 08:08
osa1 added a commit to osa1/protobuf.dart that referenced this pull request May 4, 2022
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.

None yet

3 participants