From 01c466c0fa6d8aca0493ead7981cb233e0c10cf7 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Wed, 8 Oct 2008 21:28:53 +0000 Subject: [PATCH] SOLR-736 -- make sure CoreContainer is used to initialize core (even in deprecated case) git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@702994 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/SolrCore.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index b160e05fa17..d97f92af5a7 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -374,8 +374,9 @@ public final class SolrCore implements SolrInfoMBean { synchronized( SolrCore.class ) { if( instance == null ) { try { - // sets 'instance' to the latest solr core - instance = new SolrCore( null, null, new SolrConfig(), null, null); + // sets 'instance' to the latest solr core + CoreContainer.Initializer init = new CoreContainer.Initializer(); + instance = init.initialize().getCore(""); } catch(Exception xany) { throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "error creating core", xany );