Community
Participate
Working Groups
Hi, I upgraded to Eclipse 3.1 M6 the other day and a whole bunch of errors came out of it where we use Collections.sort. The error and a small class that reproduces this error is provided. Bound mismatch: The generic method sort(List<T>) of type Collections is not applicable for the arguments (List<CollectionSort.InnerClass>) since the type CollectionSort.InnerClass is not a valid substitute for the bounded parameter <T extends Comparable<? super T>> import java.util.ArrayList; import java.util.Collections; import java.util.List; public class CollectionSort { public static void main(String[] args) { List<InnerClass> list = new ArrayList<InnerClass>(); Collections.sort(list); } static class InnerClass implements Comparable { public int compareTo(Object arg0) { return 0; } } }
Sorry *** This bug has been marked as a duplicate of 90879 ***