SOLR-7126: honor the enable.runtime.lib flag

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1664802 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2015-03-07 07:23:11 +00:00
parent b221a53496
commit a0ff7fdef2
1 changed files with 7 additions and 0 deletions

View File

@ -276,6 +276,13 @@ public class PluginRegistry<T> implements AutoCloseable {
this.pluginMeta = pluginMeta;
this.core = core;
this.resourceLoader = loader;
if (loader instanceof MemClassLoader) {
if (!"true".equals(System.getProperty("enable.runtime.lib"))) {
String s = "runtime library loading is not enabled, start Solr with -Denable.runtime.lib=true";
log.warn(s);
solrException = new SolrException(SolrException.ErrorCode.SERVER_ERROR, s);
}
}
}
@Override