Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312742 - getElementsByTagName returns a node list which contains null element.
Summary: getElementsByTagName returns a node list which contains null element.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: ACTF (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-13 01:00 EDT by Daisuke Sato CLA
Modified: 2023-03-27 14:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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