Wednesday, January 25, 2006

My favorite type of bug (no equals, no hashCode)

I love this bug - you can see that collections collapse on your UI, you go and simply add equals and hashCode methods to your objects that are placed in these collections. Simple and graceful. But when it happened for the first time - it was really nasty to find it out.

Here is a good Eclipse plug-in for building equals, hashCode, compareTo and toString methods:

No comments: