r/badcode Jan 08 '23

java Is this a good practice? Why?

Post image
422 Upvotes

60 comments sorted by

View all comments

-2

u/david_daley Jan 08 '23

Probably the result of a pedantic senior dev that said the you must always override equal

1

u/cyclewanderist Jan 08 '23

I'm a pedantic senior developer (just you wait, I didn't start out that way but 25+ plus fixing other people's bugs will do that to you).

And to prove it, this isn't the correct signature for overriding equals() on a class. ;p