summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-08-05 14:53:29 +0000
committerMark Wielaard <mark@klomp.org>2006-08-05 14:53:29 +0000
commit3eefda5cb52b0ae0161c570fc72fc35bfb2f7b7f (patch)
tree1009f8c2455cfea53b1f4925ed3566d22fcfd8a4
parenta17a97521c90382ae0bf31f40eee0db25c486a03 (diff)
downloadclasspath-3eefda5cb52b0ae0161c570fc72fc35bfb2f7b7f.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 b4067c8a9..8217b2f4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
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.