Query module InconsistentCompareTo

name
Inconsistent compareTo
description
If a class overrides ‘compareTo’ but not ‘equals’, it may mean that ‘compareTo’ and ‘equals’ are inconsistent.
kind
problem
problem.severity
warning
precision
medium
id
java/inconsistent-compareto-and-equals
tags
reliability correctness

Imports

Lombok

Provides classes and predicates for identifying use of the Lombok framework.

java

Provides all default Java QL imports.

Predicates

implementsComparableOn

Holds if t implements Comparable on typeArg.

Classes