We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I read the class EqualsHashCodeContractAssert, and since equals returns a boolean, i think
EqualsHashCodeContractAssert
equals
public static void assertIsNotEqualToNull(Object obj) { assertThat(obj.equals(null)).isNull(); }
should be
public static void assertIsNotEqualToNull(Object obj) { assertThat(obj.equals(null)).isFalse(); }
If you didn't spot the bug, i guess this is dead code.
Regards
The text was updated successfully, but these errors were encountered:
By the way, did you consider expose those assertions in the public API to check the equals contract?
Sorry, something went wrong.
Good catch! The code is dead code indeed, it was written in Fest Assert which AssertJ is a fork of.
I think it is better to use https://jqno.nl/equalsverifier/ to test equals and hashcode, no plan in the roadmap to support this.
Ok, thanks for the pointer.
1c7f106
No branches or pull requests
Hi,
I read the class
EqualsHashCodeContractAssert
, and sinceequals
returns a boolean, i thinkshould be
If you didn't spot the bug, i guess this is dead code.
Regards
The text was updated successfully, but these errors were encountered: