http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2335 *** shadow/2335 Tue Jun 26 11:28:59 2001 --- shadow/2335.tmp.3171 Tue Jun 26 11:28:59 2001 *************** *** 0 **** --- 1,32 ---- + +============================================================================+ + | Random NullPointerExceptions in DOM-implementation classes | + +----------------------------------------------------------------------------+ + | Bug #: 2335 Product: Xerces-J | + | Status: NEW Version: 1.4 | + | Resolution: Platform: Other | + | Severity: Normal OS/Version: Other | + | Priority: Other Component: DOM | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + After DOM object tree is created (either with DOMParser, or manualy by using + Document.createElement(), Document.createNode(), etc. functions), it causes + NullPointerExceptions in programmer's code. Here are the steps: + 1) Build a 3 level DOM tree: <a><b><c_1/><c_2/><c_3/>...<c_n/></b></a> where + there n is over 4000. Document can be either parsed from text or built + manually. + 2) use getChildNodes() to get children of <b> in the form of NodeList instance. + 3) Iterate through the NodeList instance. Return of the item(int) will be Null + for some items. This is a bug since under no circumstances should item of a + NodeList be null, if it is in range (and it is here). + 4) This problem occurs in multithreaded environment and the iteration through + the same document may or may not produce this error right away. Namely, the bug + does not arise if the DOM object tree is iterated in the same thread + immediately after it was created, but may arise later against the same DOM + object. Also this problem occurs only sometimes against the same XML input + which implies some thread-related problems. \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
