Home / Vulnerability Database / Kotlin : Only one of method Equals() and GetHashCode() defined
Kotlin

Kotlin : Only one of method Equals() and GetHashCode() defined

Overview

Only one of the equals() and hashCode() methods is defined in the class. This violates the Java conventions and may lead to incorrect behavior when working with collections.

Equals() and hashCode() methods are defined in class Object. Class Object is the root of the class hierarchy. All objects implement the methods of this class. And If you override one, then you should override the other, otherwise, equal (in the sense of equals()) objects may have different values for hashCode().

LOW

DerScanner Severity Score

Do you want to fix Kotlin : Only one of method Equals() and GetHashCode() defined in your application?

See also

Kotlin

Kotlin : Missing required cryptographic step

Kotlin

Kotlin : Logging into system output

Kotlin

Kotlin : Call of notify() in synchronized block