You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2008/06/08 02:51:11 UTC
svn commit: r664419 -
/lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java
Author: mikemccand
Date: Sat Jun 7 17:51:11 2008
New Revision: 664419
URL: http://svn.apache.org/viewvc?rev=664419&view=rev
Log:
fix IndexCommit.equals to compare version of the commit instead of segments filename, in addition to the Directory
Modified:
lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java
Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java?rev=664419&r1=664418&r2=664419&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexCommit.java Sat Jun 7 17:51:11 2008
@@ -81,7 +81,7 @@
public boolean equals(Object other) {
if (other instanceof IndexCommit) {
IndexCommit otherCommit = (IndexCommit) other;
- return otherCommit.getDirectory().equals(getDirectory()) && otherCommit.getSegmentsFileName().equals(getSegmentsFileName());
+ return otherCommit.getDirectory().equals(getDirectory()) && otherCommit.getVersion() == getVersion();
} else
return false;
}