You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/02/06 16:05:30 UTC
DO NOT REPLY [Bug 6271] New: -
Invalid Precondition Test
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6271>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6271
Invalid Precondition Test
Summary: Invalid Precondition Test
Product: Xerces-C++
Version: 1.6.0
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: lennyhoffman@earthlink.net
The following test is made in IDParentNode::removeChild(IDOM_Node *oldChild):
if (oldChild != 0 && oldChild->getParentNode() != castToNode(this))
throw IDOM_DOMException(IDOM_DOMException::NOT_FOUND_ERR, 0);
This test is careful to test oldChild for null before using it, but the rest of
the method is not, and assumes a valid oldChild. The following change fixes
that and is probably better represents a not found condidion, as a parent would
never own a null child.
if (oldChild == 0 || oldChild->getParentNode() != castToNode(this))
throw IDOM_DOMException(IDOM_DOMException::NOT_FOUND_ERR, 0);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org