diff --git a/src/java/com/samskivert/util/ComparableArrayList.java b/src/java/com/samskivert/util/ComparableArrayList.java index 9fdd5a2f..d2f77dc9 100644 --- a/src/java/com/samskivert/util/ComparableArrayList.java +++ b/src/java/com/samskivert/util/ComparableArrayList.java @@ -74,18 +74,7 @@ public class ComparableArrayList> return insertSorted(value, _comp); } - protected transient Comparator _comp = new Comparator() { - public int compare (T o1, T o2) { - if (o1 == o2) { // catches null == null - return 0; - } else if (o1 == null) { - return 1; - } else if (o2 == null) { - return -1; - } - return o1.compareTo(o2); // null-free - } - }; + protected transient Comparator _comp = Comparators.comparable(); /** Change this if the fields or inheritance hierarchy ever changes * (which is extremely unlikely). We override this because I'm tired