Github user tellison commented on a diff in the pull request:
https://github.com/apache/incubator-pirk/pull/28#discussion_r72583147
--- Diff: src/main/java/org/apache/pirk/schema/data/DataSchemaLoader.java
---
@@ -181,19 +172,34 @@ public DataSchema loadSchema(InputStream stream)
throws IOException, PIRExceptio
Node nNode = nList.item(i);
if (nNode.getNodeType() == Node.ELEMENT_NODE)
{
- parseElementNode((Element) nNode, dataSchema);
+ extractElementNode((Element) nNode, dataSchema);
}
}
return dataSchema;
}
- private void parseElementNode(Element eElement, DataSchema schema)
throws PIRException
+ private Document parseXMLDocument(InputStream stream) throws
IOException, PIRException
+ {
+ Document doc;
+ try
+ {
+ DocumentBuilder dBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
--- End diff --
No, the DocumentBuilder does not need to (cannot) be closed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---