SOLR-1198. remove duplicate code

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@811337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-09-04 10:14:50 +00:00
parent 0f62586398
commit c829e36d23
1 changed files with 3 additions and 7 deletions

View File

@ -247,13 +247,9 @@ public class SolrConfig extends Config {
Collections.<String, List<PluginInfo>>emptyMap():
Collections.unmodifiableMap(chains);
}
private PluginInfo loadSinglePlugin(String tag){
NodeList nodes = (NodeList) evaluate(tag, XPathConstants.NODESET);
for (int i=0; i<nodes.getLength(); i++) {
PluginInfo pluginInfo = new PluginInfo(nodes.item(i), "[solrconfig.xml] " + tag, false);
return pluginInfo.isEnabled() ? pluginInfo : null;
}
return null;
private PluginInfo loadSinglePlugin(String tag) {
List<PluginInfo> l = loadPluginInfo(tag, false);
return l.isEmpty() ? null : l.get(0);
}
private List<PluginInfo> loadPluginInfo(String tag, boolean requireName) {