Use the empty docidset provided by DocIdSet.EMPTY_DOCIDSET

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@799582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-07-31 11:32:37 +00:00
parent f73a4f4324
commit f8b2f0122c
1 changed files with 1 additions and 6 deletions

View File

@ -108,10 +108,7 @@ public class BooleanFilter extends Filter
if (res !=null)
return finalResult(res, reader.maxDoc());
if (emptyDocIdSet == null)
emptyDocIdSet = new OpenBitSetDISI(1);
return emptyDocIdSet;
return DocIdSet.EMPTY_DOCIDSET;
}
// TODO: in 3.0, instead of removing this deprecated
@ -126,8 +123,6 @@ public class BooleanFilter extends Filter
: (DocIdSet) result;
}
private static DocIdSet emptyDocIdSet = null;
/**
* Adds a new FilterClause to the Boolean Filter container
* @param filterClause A FilterClause object containing a Filter and an Occur parameter