diff --git a/solr/core/src/java/org/apache/solr/core/ConfigSolrXml.java b/solr/core/src/java/org/apache/solr/core/ConfigSolrXml.java index 67723026912..880fe80cfdd 100644 --- a/solr/core/src/java/org/apache/solr/core/ConfigSolrXml.java +++ b/solr/core/src/java/org/apache/solr/core/ConfigSolrXml.java @@ -53,7 +53,7 @@ public class ConfigSolrXml extends ConfigSolr { fillPropMap(); - String coreRoot = get(CfgProp.SOLR_COREROOTDIRECTORY, container.getSolrHome()); + String coreRoot = get(CfgProp.SOLR_COREROOTDIRECTORY, (container == null ? null : container.getSolrHome())); coreDescriptorMap = solrCoreDiscoverer.discover(container, new File(coreRoot)); } diff --git a/solr/core/src/java/org/apache/solr/core/SolrCores.java b/solr/core/src/java/org/apache/solr/core/SolrCores.java index 560f81ed9eb..2d1acf4094e 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCores.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCores.java @@ -1,5 +1,22 @@ package org.apache.solr.core; +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import java.io.File; import java.util.ArrayList; import java.util.Collection; @@ -105,9 +122,6 @@ class SolrCores { CoreContainer.log.info("Core " + coreName + " moved from core container list before closing."); } else { try { - // nocommit: wtf is this? - // addPersistOneCore(cfg, container.loader, core.getCoreDescriptor(), getCoreToOrigName(core)); - core.close(); } catch (Throwable t) { SolrException.log(CoreContainer.log, "Error shutting down core", t); diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java index 214ff218317..c9df520edfc 100644 --- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java +++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java @@ -109,7 +109,6 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 { CoreContainer.Initializer init = new CoreContainer.Initializer(); final CoreContainer cores = init.initialize(); - cores.setPersistent(false); return cores; } @@ -139,11 +138,6 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 { try { assertNull("defaultCore no longer allowed in solr.xml", cc.getDefaultCoreName()); - assertEquals("222.333.444.555", cc.zkSys.getHost()); - assertEquals("6000", cc.zkSys.getHostPort()); - assertEquals("solrprop", cc.zkSys.getHostContext()); - assertEquals(20, cc.zkSys.getZkClientTimeout()); - TestLazyCores.checkInCores(cc, "core1"); TestLazyCores.checkNotInCores(cc, "lazy1", "core2", "collection1");