use DOMUtil

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@817210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-09-21 11:29:22 +00:00
parent b8cae28ff4
commit 1379854e5e
1 changed files with 1 additions and 8 deletions

View File

@ -19,7 +19,6 @@ package org.apache.solr.core;
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 @@ public class PluginInfo {
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);
}