mirror of https://github.com/apache/lucene.git
if we cannot find a collection, return null rather than NPE
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1242830 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7728dcc5f2
commit
e9380c5370
|
@ -307,6 +307,9 @@ public class SolrDispatchFilter implements Filter
|
||||||
|
|
||||||
CloudState cloudState = zkStateReader.getCloudState();
|
CloudState cloudState = zkStateReader.getCloudState();
|
||||||
Map<String,Slice> slices = cloudState.getSlices(collection);
|
Map<String,Slice> slices = cloudState.getSlices(collection);
|
||||||
|
if (slices == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
// look for a core on this node
|
// look for a core on this node
|
||||||
Set<Entry<String,Slice>> entries = slices.entrySet();
|
Set<Entry<String,Slice>> entries = slices.entrySet();
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in New Issue