mental@...3... wrote:
Quoting Bob Jamison <rjamison@...357...>:
Note the duplicate lines.. I added a couple of lines to do a dupe check, converting the dupe to a NOP:
if (rch) { if (rch != child) { rch->mergeFrom(child, key); }
And now all seems well. Can someone test this out, and commit if you think it is ok? I need to leave the office now.
Uh, whoa. That should never ever happen. rch and child should be coming from separate subtrees, let alone never being the same.
This sounds like the XML tree is getting mangled somehow...
(I would have suspected this was the result of src == this, which you're not supposed to do, except that some of the earlier siblings were different)
-mental
Yeah, it does seem to cure the symptom rather than the disease. However, it does also seem to be a valid safety check for a recursive method. But I'll leave it to whoever wrote the code. I'm still a bit foggy on it.
Bob