lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Johnson (Created) (JIRA)" <>
Subject [jira] [Created] (SOLR-3117) CoreDescriptor attempts to use the name before checking if it is null
Date Thu, 09 Feb 2012 16:07:59 GMT
CoreDescriptor attempts to use the name before checking if it is null

                 Key: SOLR-3117
             Project: Solr
          Issue Type: Improvement
          Components: SolrCloud
    Affects Versions: 4.0
            Reporter: Jamie Johnson
            Priority: Minor

in CoreDescriptor when creating the cloudDesc the name is accessed before checking if it is

I believe it should be the following instead

  public CoreDescriptor(CoreContainer coreContainer, String name, String instanceDir) {
    this.coreContainer = coreContainer; = 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 (instanceDir == null) {
      throw new NullPointerException("Missing required \'instanceDir\'");
    instanceDir = SolrResourceLoader.normalizeDir(instanceDir);
    this.instanceDir = instanceDir;
    this.configName = getDefaultConfigName();
    this.schemaName = getDefaultSchemaName();

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message