use == for consistency w/ compareTo

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1245502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-02-17 14:09:49 +00:00
parent 297f09d818
commit 0d14e2c89a
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ public abstract class IndexCommit implements Comparable<IndexCommit> {
public boolean equals(Object other) {
if (other instanceof IndexCommit) {
IndexCommit otherCommit = (IndexCommit) other;
return otherCommit.getDirectory().equals(getDirectory()) && otherCommit.getGeneration() == getGeneration();
return otherCommit.getDirectory() == getDirectory() && otherCommit.getGeneration() == getGeneration();
} else {
return false;
}