Description
Compile this program with -Xlint:unchecked
import java.util.*;
class mc {
public static void quicksort(Vector vector, Comparator compare)
{
Collections.sort(vector,compare);
}
}
jdk8b42 javac outputs this warning (among others):
mc.java:5: warning: [unchecked] unchecked conversion
Collections.sort(vector,compare);
^
required: List<T>
found: Vector
where T is a type-variable:
jdk8b43 javac outputs this warning which is less accurate:
mc.java:5: warning: [unchecked] unchecked conversion
Collections.sort(vector,compare);
^
required: List<Object>
found: Vector
import java.util.*;
class mc {
public static void quicksort(Vector vector, Comparator compare)
{
Collections.sort(vector,compare);
}
}
jdk8b42 javac outputs this warning (among others):
mc.java:5: warning: [unchecked] unchecked conversion
Collections.sort(vector,compare);
^
required: List<T>
found: Vector
where T is a type-variable:
jdk8b43 javac outputs this warning which is less accurate:
mc.java:5: warning: [unchecked] unchecked conversion
Collections.sort(vector,compare);
^
required: List<Object>
found: Vector