Yes it is; that's how the contracts of both equals and hashCode work. When you override one, you must make sure the contract is not violated. You may not run into problems now, but in the future perhaps. And then it is so much harder to find out why errors occur.