summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-08-05 14:53:44 +0000
committerMark Wielaard <mark@klomp.org>2006-08-05 14:53:44 +0000
commitb1576c91a0ff270bc5385e06e5b142ed89ddc606 (patch)
tree51e8f62e5b4976a2bf28c4592404eaf604d5d905
parentbf5fe481a4bae7980207f227d7c2580b33e58c73 (diff)
downloadclasspath-b1576c91a0ff270bc5385e06e5b142ed89ddc606.tar.gz
2006-08-05 Robert Schuster <robertschuster@fsfe.org>
Reported by Henrik Gulbrandsen <henrik@gulbra.net> Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Added if-statement.
-rw-r--r--ChangeLog7
-rw-r--r--gnu/xml/dom/DomIterator.java8
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fa6bdf4b..d5c79bcef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-04 Robert Schuster <robertschuster@fsfe.org>
+
+ Reported by Henrik Gulbrandsen <henrik@gulbra.net>
+ Fixes PR27864.
+ * gnu/xml/dom/DomIterator.java:
+ (successor): Added if-statement.
+
2006-08-03 Roman Kennke <kennke@aicas.com>
PR 27606
diff --git a/gnu/xml/dom/DomIterator.java b/gnu/xml/dom/DomIterator.java
index 8a258926b..31f998246 100644
--- a/gnu/xml/dom/DomIterator.java
+++ b/gnu/xml/dom/DomIterator.java
@@ -253,7 +253,13 @@ public final class DomIterator
{
return here.getFirstChild();
}
-
+
+ // There's no way up or sideways from the root, so if we
+ // couldn't move down to a child, there's nowhere to go.
+ //
+ if (here == root)
+ return null;
+
//
// Siblings ... if forward, we visit them, if backwards
// we visit their children first.