If you have a Filter, you have to check for null twice: Filter.getDocIDSet() can return a null DocIDSet, and then DocIDSet.iterator() can return a null iterator.
There is no reason for this: I think iterator() should never return null (consistent with terms/postings apis).
Migrated from LUCENE-5117 by Robert Muir (@rmuir), updated Oct 23 2014
If you have a Filter, you have to check for null twice: Filter.getDocIDSet() can return a null DocIDSet, and then DocIDSet.iterator() can return a null iterator.
There is no reason for this: I think iterator() should never return null (consistent with terms/postings apis).
Migrated from LUCENE-5117 by Robert Muir (@rmuir), updated Oct 23 2014