mirror of https://github.com/apache/lucene.git
SOLR-435 -- NullPointerException with no query or empty query
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@741046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17ccf4ebef
commit
742dccd202
|
@ -236,6 +236,8 @@ Bug Fixes
|
|||
27. SOLR-991: Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name
|
||||
of the file being parsed. (Michael Henson via shalin)
|
||||
|
||||
28. SOLR-435: NullPointerException with no query or empty query (ryan, Lars Kotthoff via shalin)
|
||||
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
|
|
@ -75,6 +75,11 @@ public class QueryComponent extends SearchComponent
|
|||
|
||||
if (rb.getQueryString() == null) {
|
||||
rb.setQueryString(params.get(CommonParams.Q));
|
||||
String queryString = params.get(CommonParams.Q);
|
||||
if (queryString == null) {
|
||||
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
|
||||
"Missing or empty required parameter: q");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue