From f736f3fb082fea1289d4703eafaea187d8501491 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Sun, 9 Sep 2007 16:24:51 +0000 Subject: [PATCH] SOLR-215 -- create a new SolrCore if one does not exist git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@574025 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/SolrCore.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index 7b0378f6dc8..0f947eab110 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -237,6 +237,15 @@ public final class SolrCore { */ @Deprecated public static SolrCore getSolrCore() { + if( instance == null ) { + try { + instance = new SolrCore(null, new SolrConfig(), null); + } + catch(Exception xany) { + log.throwing("SolrCore", "getSolrCore", xany); + return null; + } + } return instance; }