Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312742

Summary: getElementsByTagName returns a node list which contains null element.
Product: z_Archived Reporter: Daisuke Sato <dsato>
Component: ACTFAssignee: Project Inbox <actf.model-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kentarou
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Daisuke Sato CLA 2010-05-13 01:00:15 EDT
Sometimes SGMLDocument.getElementsByTagName("body") returns a node list which contains null element.


---------- sample code ----------

NodeList tmpNL = target.getElementsByTagName(tagName);  // <= tagName = "body"
int length = tmpNL.getLength();	                        // <= return 1
for (int i = 0; i < length; i++) {
  (Element) tmpNL.item(i);                              // <= tmpNL.item(0) = null
}
Comment 1 Daisuke Sato CLA 2010-05-13 21:45:00 EDT
The problem was related to performance improvement of the SGMLDocument.
Comment 2 Kentarou Fukuda CLA 2010-05-19 13:04:18 EDT
Confirmed.

In SGMLParentNode#replaceChild, several steps were added for updating maps that introduced in bug 281318.
Comment 3 Kentarou Fukuda CLA 2011-05-30 02:45:50 EDT
Released in ACTF 0.8