Move null check to the right spot

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1665563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-03-10 14:21:51 +00:00
parent ae6a62b2ef
commit ca8e4be1d3
1 changed files with 3 additions and 4 deletions

View File

@ -2328,13 +2328,12 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {
ClusterStateMutator.getShardNames(shardNames, message.getStr("shards", null));
numSlices = shardNames.size();
} else {
if (numSlices == null ) {
throw new SolrException(ErrorCode.BAD_REQUEST, NUM_SLICES + " is a required param (when using CompositeId router).");
}
ClusterStateMutator.getShardNames(numSlices, shardNames);
}
if (numSlices == null ) {
throw new SolrException(ErrorCode.BAD_REQUEST, NUM_SLICES + " is a required param (when using CompositeId router).");
}
int maxShardsPerNode = message.getInt(ZkStateReader.MAX_SHARDS_PER_NODE, 1);
if (repFactor <= 0) {