SONARJAVA-497 Object should be compared with equals.

Accept == comparison in equals methods
Fix quality flaws