diff -r 7506c0293ff1 -r 0cd06d598d6f langtools/src/share/classes/com/sun/source/util/TreePath.java --- a/langtools/src/share/classes/com/sun/source/util/TreePath.java Fri Jun 26 12:22:40 2009 -0700 +++ b/langtools/src/share/classes/com/sun/source/util/TreePath.java Fri Jun 26 18:51:39 2009 -0700 @@ -120,19 +120,20 @@ public Iterator iterator() { return new Iterator() { public boolean hasNext() { - return curr.parent != null; + return next != null; } public Tree next() { - curr = curr.parent; - return curr.leaf; + Tree t = next.leaf; + next = next.parent; + return t; } public void remove() { throw new UnsupportedOperationException(); } - private TreePath curr; + private TreePath next = TreePath.this; }; }