Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable checkstyle for hashCode and equals

I need example configuration to totally disable check-style for hashCode() and equals() methods.

like image 506
Maciej Miklas Avatar asked Jan 03 '12 10:01

Maciej Miklas


1 Answers

See EqualsHashCode in Checkstyle 5.5: Coding Config. Just remove the

<module name="EqualsHashCode"/>

from your checkstyle configuration file, or do it through the Eclipse plugin. But I would ask myself why you're doing this. Bad implementation of equals() and hashCode() is a common source of errors, so be very careful before you do this.

like image 146
Matthew Farwell Avatar answered Sep 30 '22 17:09

Matthew Farwell