mirror of https://github.com/apache/lucene.git
It is better to fail early here. If you incorrectly override e.g. getDocIDSet instead of getDocIdSet(), you will never find the error, only get NPEs at unrelated positions. Throwing the UOE shows exactly where to look for the error.
For a similar case see the new DocIdSetIterator. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@788193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db261436cf
commit
8173b9f253
|
@ -37,7 +37,7 @@ public abstract class Filter implements java.io.Serializable {
|
|||
* @deprecated Use {@link #getDocIdSet(IndexReader)} instead.
|
||||
*/
|
||||
public BitSet bits(IndexReader reader) throws IOException {
|
||||
return null;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue