mirror of https://github.com/apache/lucene.git
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:
parent
e3dacf01c7
commit
f736f3fb08
|
@ -237,6 +237,15 @@ public final class SolrCore {
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static SolrCore getSolrCore() {
|
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;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue