Skip to content
Permalink
Browse files

Fixed NPE case in Solr select servlet on external Solr only setup

Regression introduced with commit
0d7625e
  • Loading branch information...
luccioman committed Apr 3, 2018
1 parent 6784c9b commit b882f8590062e563f0c3a3e22d295bb552abe12d
@@ -93,7 +93,7 @@ public void write(final Writer writer, final SolrQueryRequest request, final Sol

public static void write(final Writer writer, final SolrQueryRequest request, final SolrDocumentList sdl) throws IOException {
writer.write(XML_START);
writeDocs(writer, request, sdl, new SolrReturnFields(request));
writeDocs(writer, sdl, request != null ? new SolrReturnFields(request) : new SolrReturnFields());
writer.write(XML_STOP);
}

@@ -144,7 +144,7 @@ private static final void writeDocs(final Writer writer, final SolrQueryRequest
writer.write(lb);
}

private static final void writeDocs(final Writer writer, @SuppressWarnings("unused") final SolrQueryRequest request, final SolrDocumentList docs, final ReturnFields returnFields) throws IOException {
private static final void writeDocs(final Writer writer, final SolrDocumentList docs, final ReturnFields returnFields) throws IOException {
boolean includeScore = false;
final int sz = docs.size();
writer.write("<result");

0 comments on commit b882f85

Please sign in to comment.
You can’t perform that action at this time.