Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4919

IntsRef, BytesRef and CharsRef return incorrect hashcode when filled with 0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      IntsRef, BytesRef and CharsRef implementation do not follow the java Arrays.hashCode implementation, and return incorrect hashcode when filled with 0.
      For example, an IntsRef with { 0 } will return the same hashcode than an IntsRef with { 0, 0 }.

        Attachments

        1. LUCENE-4919.patch
          4 kB
          Renaud Delbru

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              renaud.delbru Renaud Delbru
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: