mirror of https://github.com/apache/lucene.git
SOLR-3117: CoreDescriptor attempts to use the name before checking if it is null
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1243390 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
03c278ce04
commit
06fae9dfbb
|
@ -43,15 +43,16 @@ public class CoreDescriptor {
|
|||
this.coreContainer = coreContainer;
|
||||
this.name = name;
|
||||
|
||||
if (name == null) {
|
||||
throw new RuntimeException("Core needs a name");
|
||||
}
|
||||
|
||||
if(coreContainer != null && coreContainer.getZkController() != null) {
|
||||
this.cloudDesc = new CloudDescriptor();
|
||||
// cloud collection defaults to core name
|
||||
cloudDesc.setCollectionName(name.isEmpty() ? coreContainer.getDefaultCoreName() : name);
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
throw new RuntimeException("Core needs a name");
|
||||
}
|
||||
|
||||
if (instanceDir == null) {
|
||||
throw new NullPointerException("Missing required \'instanceDir\'");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue