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

Hashcode and equals #22

Merged
merged 5 commits into from
Apr 11, 2024
Merged

Conversation

hpmellema
Copy link
Contributor

@hpmellema hpmellema commented Apr 10, 2024

Description of changes:
Adds hashcodes and equals implementation generation. Hashcode and equals implementations are not generated for ModeledSdk Exceptions.

The following draft PR shows the generated shapes: DRAFT

Note, Java array types in the generated methods use use Arrays instead of Objects for equals and hashing.

A few other changes:

  • Corrected a minor javadoc issue causing a warning
  • Split the Structure and Error generators into two separate generators
  • Moved toString implementation and ID generation methods into the writer b/c all generated shapes will use these.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@hpmellema hpmellema merged commit 189c0b8 into smithy-lang:main Apr 11, 2024
3 checks passed
@hpmellema hpmellema deleted the hashcode-and-equals branch April 11, 2024 16:37
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