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
This commit is contained in:
Ryan McKinley 2007-09-09 16:24:51 +00:00
parent e3dacf01c7
commit f736f3fb08
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}