mirror of https://github.com/apache/lucene.git
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:
parent
8c97e9b87b
commit
6bbb079a68
|
@ -81,7 +81,7 @@ public abstract class IndexCommit implements IndexCommitPoint {
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (other instanceof IndexCommit) {
|
if (other instanceof IndexCommit) {
|
||||||
IndexCommit otherCommit = (IndexCommit) other;
|
IndexCommit otherCommit = (IndexCommit) other;
|
||||||
return otherCommit.getDirectory().equals(getDirectory()) && otherCommit.getSegmentsFileName().equals(getSegmentsFileName());
|
return otherCommit.getDirectory().equals(getDirectory()) && otherCommit.getVersion() == getVersion();
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue