diff options
author | Chris Burdess <dog@bluezoo.org> | 2006-12-06 18:38:06 +0000 |
---|---|---|
committer | Chris Burdess <dog@bluezoo.org> | 2006-12-06 18:38:06 +0000 |
commit | f7142033b35860eec10f9729793294795bedc265 (patch) | |
tree | 945e77d0b50691e2dbc3c77269d98bc8a60acc36 | |
parent | 4434aab4fd7acec931989196a39dcc4d04005512 (diff) | |
download | classpath-f7142033b35860eec10f9729793294795bedc265.tar.gz |
2006-12-06 Ben Konrath <bkonrath@redhat.com>
Fixes PR 29853.
* gnu/xml/dom/DomAttr.java: Don't report mutation if oldValue and
newValue are the same.
* gnu/xml/dom/DomNode.java: Set parent if null during mutation.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gnu/xml/dom/DomAttr.java | 2 | ||||
-rw-r--r-- | gnu/xml/dom/DomNode.java | 2 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2006-12-06 Ben Konrath <bkonrath@redhat.com> + + Fixes PR 29853. + * gnu/xml/dom/DomAttr.java: Don't report mutation if oldValue and + newValue are the same. + * gnu/xml/dom/DomNode.java: Set parent if null during mutation. + 2006-12-06 Tania Bento <tbento@redhat.com> * javax/swing/border/CompoundBorder.java: diff --git a/gnu/xml/dom/DomAttr.java b/gnu/xml/dom/DomAttr.java index 8673a7961..31d7af2d2 100644 --- a/gnu/xml/dom/DomAttr.java +++ b/gnu/xml/dom/DomAttr.java @@ -316,7 +316,7 @@ public class DomAttr private void mutating(String oldValue, String newValue, short why) { - if (!reportMutations || parent == null) + if (!reportMutations || parent == null || equal(newValue, oldValue)) { return; } diff --git a/gnu/xml/dom/DomNode.java b/gnu/xml/dom/DomNode.java index 269038aa7..9af3f3e54 100644 --- a/gnu/xml/dom/DomNode.java +++ b/gnu/xml/dom/DomNode.java @@ -1562,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]; |