mirror of https://github.com/apache/lucene.git
improve specificity of error messages
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1662320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
563c9da606
commit
00ab5bacc6
|
@ -65,10 +65,15 @@ public class FilteredQuery extends Query {
|
|||
* @see FilterStrategy
|
||||
*/
|
||||
public FilteredQuery(Query query, Filter filter, FilterStrategy strategy) {
|
||||
if (query == null || filter == null)
|
||||
throw new IllegalArgumentException("Query and filter cannot be null.");
|
||||
if (strategy == null)
|
||||
throw new IllegalArgumentException("FilterStrategy can not be null");
|
||||
if (query == null) {
|
||||
throw new IllegalArgumentException("Query must not be be null.");
|
||||
}
|
||||
if (filter == null) {
|
||||
throw new IllegalArgumentException("Filter must not be be null.");
|
||||
}
|
||||
if (strategy == null) {
|
||||
throw new IllegalArgumentException("FilterStrategy must not be null");
|
||||
}
|
||||
this.strategy = strategy;
|
||||
this.query = query;
|
||||
this.filter = filter;
|
||||
|
|
Loading…
Reference in New Issue