Apache Lucene open-source search software
AbstractPluginLoader needs to return 'null' unless there was something registred to the same location
Ryan McKinleyc3f80c5004b2
diff --git a/src/java/org/apache/solr/schema/IndexSchema.java b/src/java/org/apache/solr/schema/IndexSchema.javaindex 50b4a1a6831..5ef5ca3bc05 100644--- a/src/java/org/apache/solr/schema/IndexSchema.java+++ b/src/java/org/apache/solr/schema/IndexSchema.java@@ -619,12 +619,12 @@ public final class IndexSchema {@Overrideprotected TokenizerFactory register(String name, TokenizerFactory plugin) throws Exception {- return plugin; // does not need to do anything+ return null; // used for map registration}};tokenizerLoader.load( solrConfig.getResourceLoader(), (NodeList)xpath.evaluate("./tokenizer", node, XPathConstants.NODESET) );- // Make sure somethign was loaded+ // Make sure something was loadedif( tokenizers.isEmpty() ) {throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"analyzer without class or tokenizer & filter list");}@@ -646,7 +646,7 @@ public final class IndexSchema {@Overrideprotected TokenFilterFactory register(String name, TokenFilterFactory plugin) throws Exception {- return plugin; // does not need to do anything+ return null; // used for map registration}};filterLoader.load( solrConfig.getResourceLoader(), (NodeList)xpath.evaluate("./filter", node, XPathConstants.NODESET) );