fix class cast exception in TreeSet ctor

This commit is contained in:
Joel Dice 2008-07-17 15:46:54 -06:00
parent 244393430d
commit a677a2da17

View File

@ -24,12 +24,11 @@ public class TreeSet<T> extends AbstractSet<T> implements Collection<T> {
} }
public TreeSet() { public TreeSet() {
set = new PersistentSet(new Comparator<Cell<T>>() { this(new Comparator<T>() {
public int compare(Cell<T> a, Cell<T> b) { public int compare(T a, T b) {
return ((Comparable)a).compareTo(b); return ((Comparable) a).compareTo(b);
} }
}); });
size = 0;
} }
public Iterator<T> iterator() { public Iterator<T> iterator() {