This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | NullPointerException at org.openide.xml.XMLUtil.findElement | ||
---|---|---|---|
Product: | projects | Reporter: | bsbc99 <bsbc99> |
Component: | Ant Freeform | Assignee: | Martin Kozeny <mkozeny> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 199720 |
Attachments: | stacktrace |
Description
bsbc99
2013-03-19 10:43:09 UTC
Created attachment 132786 [details]
stacktrace
there must be some kind of data inconsistency in the dom tree or some error in jdk sources? The freeform code calls: XMLUtil.findElement(actionEl, "context", FreeformProjectType.NS_GENERAL); which was repeatedly called before on the same data structures right before this call, only difference being different "context" parameter. in XMLUtil the code looks like this: NodeList l = parent.getChildNodes(); int nodeCount = l.getLength(); for (int i = 0; i < nodeCount; i++) { if (l.item(i).getNodeType() == Node.ELEMENT_NODE) { the NPE is thrown on the last line. Assuming that parent.getChildNodes() can never be null, then null can only occur when one of the items in the list null. but as was said before any of the 2 possibilities should have been thrown in the previous invokations of the methods with the same parent element. So apparently the data structure changed or the jdk implementation of the nodelist. I've double checked our codebase and we appear to always clone entire dom trees within the AuxiliaryConfiguration methods, so the dom trees should be immutable. Reported for 7.3.x or earlier, no new info since then -> closing as worksforme, please reopen in case you see it. |