fix IndexCommit.equals to compare version of the commit instead of segments filename, in addition to the Directory

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@664419 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-06-08 00:51:11 +00:00
parent 8c97e9b87b
commit 6bbb079a68
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public abstract class IndexCommit implements IndexCommitPoint {
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;
}