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:
Mark Robert Miller 2012-02-10 15:57:00 +00:00
parent 7728dcc5f2
commit e9380c5370
1 changed files with 3 additions and 0 deletions

View File

@ -307,6 +307,9 @@ public class SolrDispatchFilter implements Filter
CloudState cloudState = zkStateReader.getCloudState();
Map<String,Slice> slices = cloudState.getSlices(collection);
if (slices == null) {
return null;
}
// look for a core on this node
Set<Entry<String,Slice>> entries = slices.entrySet();
done: