Prevent the debug statement from throwing NullPointerException on a null Query.
This commit is contained in:
parent
1906e6a484
commit
b901521f7b
1 changed files with 2 additions and 2 deletions
|
@ -86,12 +86,12 @@ public class AutocompleteController extends FreemarkerHttpServlet{
|
||||||
Analyzer analyzer = getAnalyzer(getServletContext());
|
Analyzer analyzer = getAnalyzer(getServletContext());
|
||||||
|
|
||||||
Query query = getQuery(vreq, portalFlag, analyzer, qtxt);
|
Query query = getQuery(vreq, portalFlag, analyzer, qtxt);
|
||||||
log.debug("query for '" + qtxt +"' is " + query.toString());
|
|
||||||
|
|
||||||
if (query == null ) {
|
if (query == null ) {
|
||||||
|
log.debug("query for '" + qtxt +"' is null.");
|
||||||
doNoQuery(map, config, request, response);
|
doNoQuery(map, config, request, response);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.debug("query for '" + qtxt +"' is " + query.toString());
|
||||||
|
|
||||||
IndexSearcher searcherForRequest = LuceneIndexFactory.getIndexSearcher(getServletContext());
|
IndexSearcher searcherForRequest = LuceneIndexFactory.getIndexSearcher(getServletContext());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue