SOLR-11224: SolrStream.close can hit an NPE

This commit is contained in:
Erick Erickson 2017-09-26 09:26:12 -07:00
parent 3b0f46b27d
commit 424fb3bfb7
2 changed files with 5 additions and 1 deletions

View File

@ -151,6 +151,8 @@ Bug Fixes
* SOLR-11399: The UnifiedHighlighter was ignoring the hl.fragsize parameter when hl.bs.type=SEPARATOR
(Marc Morissette via David Smiley)
* SOLR-11224: SolrStream.close can hit an NPE (Erick Erickson)
Optimizations
----------------------

View File

@ -176,7 +176,9 @@ public class SolrStream extends TupleStream {
* */
public void close() throws IOException {
closeableHttpResponse.close();
if (closeableHttpResponse != null) {
closeableHttpResponse.close();
}
if(cache == null) {
client.close();
}