Skip to content

Files

Latest commit

 

History

History
18 lines (11 loc) · 624 Bytes

EqualsHashCode.md

File metadata and controls

18 lines (11 loc) · 624 Bytes

Pattern: Missing override for equals() or hashCode()

Issue: -

Description

Defining either equals() or hashCode() in a class without defining the other is a known source of bugs. Usually, when you define one, you should also define the other.

Example configuration

<check enabled="true" class="org.scalastyle.scalariform.EqualsHashCodeChecker" level="warning"/>