ER-114 Use object.equals(anotherObject) instead of object.compareTo(anotherObject)==0

Severity3
Enabledyes
Waivable
Rationaleequals() is part of the java.lang.Object contract whereas compareTo() is part of the java.lang.Comparable contract. Use more generic methods. Not every class implements compareTo(), but each class has equals() method.


Hammurapi 3 Copyright © 2004 Hammurapi Group. All Rights Reserved.