-
Notifications
You must be signed in to change notification settings - Fork 0
Check: Required Overrides
Madeline Kahn edited this page Mar 27, 2024
·
2 revisions
- Name:
"requiredOverrides"
- Default: Enabled
This check performs the following two validations for methods that imply other methods should be overridden:
- Generates a warning for any class that extends the interface Comparable and implements
compareTo(CLASS)
(whereCLASS
is the type of the class itself), but does not also implementequals(Object)
. - Generates an error for any class that implements
equals(Object)
but does not also implementhashCode()
.