--- a/jdk/src/share/classes/java/util/TreeSet.java Mon Mar 10 14:32:51 2008 -0700
+++ b/jdk/src/share/classes/java/util/TreeSet.java Mon Mar 10 15:07:09 2008 -0700
@@ -195,7 +195,7 @@
* @since 1.6
*/
public NavigableSet<E> descendingSet() {
- return new TreeSet(m.descendingMap());
+ return new TreeSet<E>(m.descendingMap());
}
/**
@@ -505,8 +505,8 @@
s.writeInt(m.size());
// Write out all elements in the proper order.
- for (Iterator i=m.keySet().iterator(); i.hasNext(); )
- s.writeObject(i.next());
+ for (E e : m.keySet())
+ s.writeObject(e);
}
/**