Menu

#15 EqualsHashCodeTest.TestEqualsAgainstNull checks incorrectly

Latest_release
open
nobody
5
2004-10-25
2004-10-25
No

If you look at the code for testEqualsAgainstNull, it
has statements such as
Assert.assertNotEquals("null vs. 1st", null, eq1);
If you look at assertNotEquals, however, you will see
that eq1.equals(null) is never called. Instead the test
will always suceed, even if eq1.equals(null) returns true.

-

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.