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

Equals on the CalendarEvent should only be true if summary and description match #309

Merged
merged 1 commit into from
Sep 19, 2017

Conversation

rbuehlma
Copy link
Contributor

No description provided.

@rbuehlma rbuehlma force-pushed the equals_with_different_summary branch from a118e7c to a3260a4 Compare July 31, 2017 12:47
Copy link
Owner

@rianjs rianjs left a comment

Choose a reason for hiding this comment

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

In the future, can you make symmetrical changes to both net-core and v2? I'll add the change to the v2 release after I merge this.

@rianjs rianjs merged commit 9c67555 into rianjs:master Sep 19, 2017
@rianjs
Copy link
Owner

rianjs commented Sep 19, 2017

Oh, and you should never change Equals without also making the same change in GetHashCode and vice-versa.

That's true in all of the code you write.

@rbuehlma
Copy link
Contributor Author

rbuehlma commented Sep 19, 2017

ok, will update both versions of the library in the future.

for the GetHashCode: I made the Equals more strict. GetHashCode needs to be the same if Equals true. If Equals is false, GetHashCode may still be the same. This should still be the case. But yes, the HashCode could be improved by also adding the fields there.

Oh and thanks for merging :)

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.

2 participants