mirror of https://github.com/apache/lucene.git
SOLR-8191: Gaurd against CloudSolrStream close method NullPointerException
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1720460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d200689b2b
commit
352ae7ed5f
|
@ -361,11 +361,13 @@ public class CloudSolrStream extends TupleStream implements Expressible {
|
||||||
* Closes the CloudSolrStream
|
* Closes the CloudSolrStream
|
||||||
**/
|
**/
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
|
if(solrStreams != null) {
|
||||||
for (TupleStream solrStream : solrStreams) {
|
for (TupleStream solrStream : solrStreams) {
|
||||||
solrStream.close();
|
solrStream.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(cache == null) {
|
if(cache == null && cloudSolrClient != null) {
|
||||||
cloudSolrClient.close();
|
cloudSolrClient.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue