mirror of https://github.com/apache/lucene.git
throw a good error rather than NPE when no collection is found to request against
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1294894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1fbc36305
commit
f75eae6217
|
@ -142,6 +142,10 @@ public class CloudSolrServer extends SolrServer {
|
|||
}
|
||||
String collection = reqParams.get("collection", defaultCollection);
|
||||
|
||||
if (collection == null) {
|
||||
throw new SolrServerException("No collection param specified on request and no default collection has been set.");
|
||||
}
|
||||
|
||||
// Extract each comma separated collection name and store in a List.
|
||||
List<String> collectionList = StrUtils.splitSmart(collection, ",", true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue