-
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
Does not work with class having j.n.ByteBuffers #198
Comments
Thanks for reporting this. I've reproduced the issue, and it's also true for other Buffers such as CharBuffer. I'll add them to the built-in prefab values. Unfortunately I might not be able to do that before I leave on holiday. I'll let you know when I release a fix. In the mean time you can manually add the prefab values as a workaround. |
Also, thank you for the elaborate code samples. Unfortunately, not everybody does this, but it makes reproducing these kinds of issues so much easier. Thank you! |
Thank you very much for taking a look at the issue! |
Managed to squeeze in a release today. Check out version 2.4.8! |
Brilliant, thank you! Just wondering — is the fact that EV did not show a proper error message in this case a separate bug? I am not sure, but I think I saw once a message asking for "prefab values" for my own data type. |
I have to admit I didn't really look into it. I agree though, it should have shown a proper error message instead of this one. |
What steps will reproduce the problem?
Run EqualsVerifier.verify on any class that has a field of type
j.n.ByteBuffer
, and you'll receive the following error:Significant fields: equals does not use <field name of type ByteBuffer>, or it is stateless.
.What is the code that triggers this problem?
The first test is the one that triggers the problem, the second — a workaround, the last — a baseline.
What error message or stack trace does EqualsVerifier give?
What did you expect?
Ideally, to work out of the box with no need to provide "prefab values". If that is not possible or does not make sense to implement in the library, provide an error message that explains that the user must provide these values. The current error message suggest a problem in
equals/hashCode
(i.e., missing comparison operation of some field), not in the test code, which is not true.Which version of EqualsVerifier are you using?
2.4.7
The text was updated successfully, but these errors were encountered: