resources.report.rules.findbugs.EQ_ALWAYS_FALSE.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sanity4j Show documentation
Show all versions of sanity4j Show documentation
Sanity4J was created to simplify running multiple static code
analysis tools on the Java projects. It provides a single entry
point to run all the selected tools and produce a consolidated
report, which presents all findings in an easily accessible
manner.
Eq: equals method always returns false (EQ_ALWAYS_FALSE)
Eq: equals method always returns false (EQ_ALWAYS_FALSE)
This class defines an equals method that always returns false. This means that an object is not equal to itself, and it is impossible to create useful Maps or Sets of this class. More fundementally, it means
that equals is not reflexive, one of the requirements of the equals method.
The likely intended semantics are object identity: that an object is equal to itself. This is the behavior inherited from class Object
. If you need to override an equals inherited from a different
superclass, you can use use:
public boolean equals(Object o) { return this == o; }