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

Scala : 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 Scala : Only one of method Equals() and GetHashCode() defined in your application?

See also

Scala

Scala : Unreleased resource stream

Scala

Scala : Multiple loggers in same class

Scala

Scala : Insufficient encryption key length