mirror of https://github.com/apache/lucene.git
LUCENE-1764 minor tweaks to SampleComparable so that it causes more sane FieldCache usage in contrib/remote tests
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@798726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72a17d83d3
commit
5a21421a61
|
@ -134,11 +134,15 @@ implements Comparable, Serializable {
|
|||
};
|
||||
}
|
||||
|
||||
public static SortComparator getComparator() {
|
||||
return new SortComparator() {
|
||||
private static final class InnerSortComparator extends SortComparator {
|
||||
protected Comparable getComparable (String termtext) {
|
||||
return new SampleComparable (termtext);
|
||||
}
|
||||
public int hashCode() { return this.getClass().getName().hashCode(); }
|
||||
public boolean equals(Object that) { return this.getClass().equals(that.getClass()); }
|
||||
};
|
||||
|
||||
public static SortComparator getComparator() {
|
||||
return new InnerSortComparator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue