diff options
Diffstat (limited to 'libjava/classpath/gnu/xml/dom/DomNode.java')
| -rw-r--r-- | libjava/classpath/gnu/xml/dom/DomNode.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/classpath/gnu/xml/dom/DomNode.java b/libjava/classpath/gnu/xml/dom/DomNode.java index f0915eb5e93..9af3f3e5498 100644 --- a/libjava/classpath/gnu/xml/dom/DomNode.java +++ b/libjava/classpath/gnu/xml/dom/DomNode.java @@ -668,6 +668,7 @@ public abstract class DomNode { insertionEvent(null, child); } + length++; } return child; @@ -1561,7 +1562,7 @@ public abstract class DomNode // Climb to the top of this subtree and handle capture, letting // each node (from the top down) capture until one stops it or // until we get to this one. - current = parent; + current = (parent == null) ? this : parent; if (current.depth >= ANCESTORS_INIT) { DomNode[] newants = new DomNode[current.depth + 1]; |
