lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r811337 - /lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
Date Fri, 04 Sep 2009 10:14:50 GMT
Author: noble
Date: Fri Sep  4 10:14:50 2009
New Revision: 811337

URL: http://svn.apache.org/viewvc?rev=811337&view=rev
Log:
SOLR-1198. remove duplicate code

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=811337&r1=811336&r2=811337&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Fri Sep  4 10:14:50 2009
@@ -247,13 +247,9 @@
             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) {



Mime
View raw message