-
Notifications
You must be signed in to change notification settings - Fork 75
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 support for Lombok's @EqualsAndHashCode(cacheStrategy = LAZY) #460
Comments
janeisklar
added a commit
to janeisklar/equalsverifier
that referenced
this issue
Jul 6, 2021
jqno
added a commit
that referenced
this issue
Jul 7, 2021
#460: Add support for @EqualsAndHashCode(cacheStrategy = LAZY)
Thank you for the nice PR, and for even updating the docs! I'll let you know when I release this. |
I've just released version 3.7! |
Thanks again for the extremely fast response time and a great utility:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The following class currently can't be tested using equalsverifier:
Equalsverifier fails with the following error message:
hashCode relies on $hashCodeCache, but equals does not.
.Describe the solution you'd like
I want to be able to test the hashcode method that is created by Lombok when using its lazy caching strategy.
Describe alternatives you've considered
Using
.withCachedHashCode
would seem like an obvious option to work around this, but this unfortunately only works with private methods and thus fails withCached hashCode: Could not find calculateHashCodeMethod: must be 'private int hashCode()'
.Additional context
I will provide a pull request with an proposal on how to solve this in a bit.
The text was updated successfully, but these errors were encountered: