Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1207

equals method should compare this and other of DocList in DocSetBase

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 1.2, 1.3, 1.4
    • Fix Version/s: 1.4
    • Component/s: search
    • Labels:
      None

      Description

      There is a fault in equals method of DocSetBase class:

      if (this instanceof DocList && other instanceof DocList) {
        // compare ordering
        DocIterator i1=this.iterator();
        DocIterator i2=this.iterator();       // <== *this should be other*
        while(i1.hasNext() && i2.hasNext()) {
          if (i1.nextDoc() != i2.nextDoc()) return false;
        }
        return true;
        // don't compare matches
      }
      

        Attachments

          Activity

            People

            • Assignee:
              koji Koji Sekiguchi
              Reporter:
              koji Koji Sekiguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: