lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r817210 - /lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java
Date Mon, 21 Sep 2009 11:29:26 GMT
Author: noble
Date: Mon Sep 21 11:29:22 2009
New Revision: 817210

URL: http://svn.apache.org/viewvc?rev=817210&view=rev
Log:
use DOMUtil

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

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java?rev=817210&r1=817209&r2=817210&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java Mon Sep 21 11:29:22 2009
@@ -19,7 +19,6 @@
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.DOMUtil;
 import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.NodeList;
 
 import javax.xml.xpath.XPathConstants;
@@ -53,13 +52,7 @@
     name = DOMUtil.getAttr(node, "name", requireName ? err : null);
     className = DOMUtil.getAttr(node, "class", requireClass ? err : null);
     initArgs = DOMUtil.childNodesToNamedList(node);
-    Map<String, String> m = new HashMap<String, String>();
-    NamedNodeMap nnm = node.getAttributes();
-    for (int i = 0; i < nnm.getLength(); i++) {
-      String name = nnm.item(i).getNodeName();
-      m.put(name, nnm.item(i).getNodeValue());
-    }
-    attributes = unmodifiableMap(m);
+    attributes = unmodifiableMap(DOMUtil.toMap(node.getAttributes()));
     children = loadSubPlugins(node);
   }
 



Mime
View raw message