You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2014/07/03 23:18:33 UTC

[jira] [Created] (HBASE-11463) (findbugs) HE: Class defines equals() and uses Object.hashCode()

Mike Drob created HBASE-11463:
---------------------------------

             Summary: (findbugs) HE: Class defines equals() and uses Object.hashCode()
                 Key: HBASE-11463
                 URL: https://issues.apache.org/jira/browse/HBASE-11463
             Project: HBase
          Issue Type: Bug
            Reporter: Mike Drob
            Priority: Trivial


Findbugs warns that several classes define {{equals}} but not {{hashcode}}:

{noformat}
HE: Class defines equals() and uses Object.hashCode() (HE_EQUALS_USE_HASHCODE)

This class overrides equals(Object), but does not override hashCode(), and inherits the implementation of hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary value assigned to the object by the VM).  Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)