summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Burdess <dog@bluezoo.org>2006-12-06 18:38:06 +0000
committerChris Burdess <dog@bluezoo.org>2006-12-06 18:38:06 +0000
commitf7142033b35860eec10f9729793294795bedc265 (patch)
tree945e77d0b50691e2dbc3c77269d98bc8a60acc36
parent4434aab4fd7acec931989196a39dcc4d04005512 (diff)
downloadclasspath-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--ChangeLog7
-rw-r--r--gnu/xml/dom/DomAttr.java2
-rw-r--r--gnu/xml/dom/DomNode.java2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fb6bc58f3..c79cf5e18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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];