mirror of https://github.com/apache/lucene.git
fix SortField.equals+hashCode by using comparatorSource
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@782322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d8e7b96839
commit
c14a2bfe49
|
@ -420,6 +420,7 @@ implements Serializable {
|
|||
&& other.reverse == this.reverse
|
||||
&& (other.locale == null ? this.locale == null : other.locale.equals(this.locale))
|
||||
&& (other.factory == null ? this.factory == null : other.factory.equals(this.factory))
|
||||
&& (other.comparatorSource == null ? this.comparatorSource == null : other.comparatorSource.equals(this.comparatorSource))
|
||||
&& (other.parser == null ? this.parser == null : other.parser.equals(this.parser))
|
||||
);
|
||||
}
|
||||
|
@ -434,6 +435,7 @@ implements Serializable {
|
|||
if (field != null) hash += field.hashCode()^0xff5685dd;
|
||||
if (locale != null) hash += locale.hashCode()^0x08150815;
|
||||
if (factory != null) hash += factory.hashCode()^0x34987555;
|
||||
if (comparatorSource != null) hash += comparatorSource.hashCode();
|
||||
if (parser != null) hash += parser.hashCode()^0x3aaf56ff;
|
||||
return hash;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue