Prevent the debug statement from throwing NullPointerException on a null Query.

This commit is contained in:
jeb228 2011-02-07 15:17:58 +00:00
parent 1906e6a484
commit b901521f7b

View file

@ -86,12 +86,12 @@ public class AutocompleteController extends FreemarkerHttpServlet{
Analyzer analyzer = getAnalyzer(getServletContext());
Query query = getQuery(vreq, portalFlag, analyzer, qtxt);
log.debug("query for '" + qtxt +"' is " + query.toString());
if (query == null ) {
log.debug("query for '" + qtxt +"' is null.");
doNoQuery(map, config, request, response);
return;
}
log.debug("query for '" + qtxt +"' is " + query.toString());
IndexSearcher searcherForRequest = LuceneIndexFactory.getIndexSearcher(getServletContext());