mirror of https://github.com/apache/lucene.git
OneComparatorFieldValueHitQueue redundantly checks array size - it is alredy guaranteed to be of the right one by FVHQ.create()
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1059569 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88b63174ac
commit
15a72e7698
|
@ -57,9 +57,6 @@ public abstract class FieldValueHitQueue extends PriorityQueue<FieldValueHitQueu
|
||||||
public OneComparatorFieldValueHitQueue(SortField[] fields, int size)
|
public OneComparatorFieldValueHitQueue(SortField[] fields, int size)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
super(fields);
|
super(fields);
|
||||||
if (fields.length == 0) {
|
|
||||||
throw new IllegalArgumentException("Sort must contain at least one field");
|
|
||||||
}
|
|
||||||
|
|
||||||
SortField field = fields[0];
|
SortField field = fields[0];
|
||||||
setComparator(0,field.getComparator(size, 0));
|
setComparator(0,field.getComparator(size, 0));
|
||||||
|
|
Loading…
Reference in New Issue