Apache Lucene open-source search software
SOLR-1207: equals method should compare this and other of DocList in DocSetBase
Koji Sekiguchi2eef2dfdc542
diff --git a/CHANGES.txt b/CHANGES.txtindex 417010e4fbe..91df91c4ce3 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -409,6 +409,8 @@ Bug Fixes48. SOLR-1182: Fix bug in OrdFieldSource#equals which could cause a bug with OrdFieldSource cachingon OrdFieldSource#hashcode collisions. (Mark Miller)+49. SOLR-1207: equals method should compare this and other of DocList in DocSetBase (koji)+Other Changes----------------------diff --git a/src/java/org/apache/solr/search/DocSet.java b/src/java/org/apache/solr/search/DocSet.javaindex 02d2e312ca0..058faf13d45 100644--- a/src/java/org/apache/solr/search/DocSet.java+++ b/src/java/org/apache/solr/search/DocSet.java@@ -162,7 +162,7 @@ abstract class DocSetBase implements DocSet {if (this instanceof DocList && other instanceof DocList) {// compare orderingDocIterator i1=this.iterator();- DocIterator i2=this.iterator();+ DocIterator i2=other.iterator();while(i1.hasNext() && i2.hasNext()) {if (i1.nextDoc() != i2.nextDoc()) return false;}