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

Add equals and hashCode to ErrorExample #2052

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

miguel-vila
Copy link
Contributor

Issue #, if available:

We looked into this because we were having some false negatives while comparing values of the @examples trait. Part of it was using an old version of smithy which didn't have an equals for Example, but this could happen if the trait also has an ErrorExample.

Description of changes:

Adds a simple implementation and a test.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@miguel-vila miguel-vila requested a review from a team as a code owner November 24, 2023 15:25
@kubukoz
Copy link
Contributor

kubukoz commented Dec 4, 2023

Can we have this reviewed and released?

Related: #2009

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
@gosar
Copy link
Contributor

gosar commented Dec 5, 2023

This branch cannot be rebased due to conflicts

Hi @miguel-vila, can you rebase? I can merge after that. Thanks.

@srchase srchase merged commit 7b7a3f3 into smithy-lang:main Dec 5, 2023
10 checks passed
rchache pushed a commit to rchache/smithy that referenced this pull request Jan 2, 2024
* Add `equals` and `hashCode` implementations to `Example` and `ExampleOrder`

* remove line

* add negative test

* Use `Objects.equals`

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>

---------

Co-authored-by: Miguel Villa <miguel.villa@siriusxm.com>
Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
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.

4 participants