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:
Uwe Schindler 2009-09-08 20:00:08 +00:00
parent 26b9f64ab8
commit c3063ec882
1 changed files with 2 additions and 0 deletions

View File

@ -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;