Apache Lucene open-source search software
improve specificity of error messages
Michael McCandless00ab5bacc6d3
diff --git a/lucene/core/src/java/org/apache/lucene/search/FilteredQuery.java b/lucene/core/src/java/org/apache/lucene/search/FilteredQuery.javaindex e9a737bde4c..5b25ac22859 100644--- a/lucene/core/src/java/org/apache/lucene/search/FilteredQuery.java+++ b/lucene/core/src/java/org/apache/lucene/search/FilteredQuery.java@@ -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;