Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11463

(findbugs) HE: Class defines equals() and uses Object.hashCode()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.99.0
    • None
    • Reviewed

    Description

      Findbugs warns that several classes define equals but not hashcode:

      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.
      

      Attachments

        1. 11463v3.txt
          22 kB
          Michael Stack
        2. HBASE-11463.patch
          7 kB
          Michael Stack
        3. HBASE-11463.patch
          7 kB
          Michael Stack
        4. HBASE-11463.patch.txt
          7 kB
          Mike Drob
        5. HBASE-11463.v2.patch.txt
          22 kB
          Mike Drob

        Activity

          People

            mdrob Mike Drob
            mdrob Mike Drob
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: