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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: