mirror of https://github.com/apache/lucene.git
LUCENE-1901: TermAttributeImpl.equals() must also check termLength
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@812666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
26b9f64ab8
commit
c3063ec882
|
@ -194,6 +194,8 @@ public class TermAttributeImpl extends AttributeImpl implements TermAttribute, C
|
|||
TermAttributeImpl o = ((TermAttributeImpl) other);
|
||||
o.initTermBuffer();
|
||||
|
||||
if (termLength != o.termLength)
|
||||
return false;
|
||||
for(int i=0;i<termLength;i++) {
|
||||
if (termBuffer[i] != o.termBuffer[i]) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue