equals()
are not of the same type.Closer inspection showed that this have been Enums in most cases. The IDEs did not warn here and maunal code inspection also does not directly show the issue.
Luckily with enums, you can use
==
to compare them. And then it gets obvious:Just a small little change in habits, but it helps a lot.