summaryrefslogtreecommitdiff
path: root/gnu/xml
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/xml')
-rw-r--r--gnu/xml/dom/DomAttr.java2
-rw-r--r--gnu/xml/dom/DomNode.java2
2 files changed, 2 insertions, 2 deletions
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];