-none- 2004-05-14 - By -not available-
else { // long way n = firstChild; for (i = 0; i < index && n != null; i++) { n = n.nextSibling; } }
n is initialized with firstChild, which probably is not null for a NodeList of size >= 1. Though the following loop never runs, n keeps the value of firstChild until method exit for the return value, even though the passed index is -1. This way, the first child node is returned instead of the expected value, null.
(Please note that the above is only a quick-glance-observation and I might be wrong on the real cause for NodeList.item(-1) (or any negative value, for that matter), not returning null in all cases as expected.)
Kind regards, Christian.
--------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-dev-unsubscribe@(protected) For additional commands, e-mail: xerces-j-dev-help@(protected)
|
|