From a677a2da173cdd2a61f70b8223f012ac43a8798b Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 17 Jul 2008 15:46:54 -0600 Subject: [PATCH] fix class cast exception in TreeSet ctor --- classpath/java/util/TreeSet.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/classpath/java/util/TreeSet.java b/classpath/java/util/TreeSet.java index a2eddfe22a..eaff92106a 100644 --- a/classpath/java/util/TreeSet.java +++ b/classpath/java/util/TreeSet.java @@ -24,12 +24,11 @@ public class TreeSet extends AbstractSet implements Collection { } public TreeSet() { - set = new PersistentSet(new Comparator>() { - public int compare(Cell a, Cell b) { - return ((Comparable)a).compareTo(b); - } + this(new Comparator() { + public int compare(T a, T b) { + return ((Comparable) a).compareTo(b); + } }); - size = 0; } public Iterator iterator() {