lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r812666 - /lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
Date Tue, 08 Sep 2009 20:00:08 GMT
Author: uschindler
Date: Tue Sep  8 20:00:08 2009
New Revision: 812666

URL: http://svn.apache.org/viewvc?rev=812666&view=rev
Log:
LUCENE-1901: TermAttributeImpl.equals() must also check termLength

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java?rev=812666&r1=812665&r2=812666&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
(original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
Tue Sep  8 20:00:08 2009
@@ -194,6 +194,8 @@
       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;



Mime
View raw message