Apache Solr open-source search software
use == for consistency w/ compareTo
Michael McCandless0d14e2c89a78
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexCommit.java b/lucene/core/src/java/org/apache/lucene/index/IndexCommit.javaindex 752abb24cdc..f36d2e1bdec 100644--- a/lucene/core/src/java/org/apache/lucene/index/IndexCommit.java+++ b/lucene/core/src/java/org/apache/lucene/index/IndexCommit.java@@ -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;}