-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
7
-
generic
-
generic
Compiler should warn if a generic class extends or implements a raw type.
import java.util.Collection;
class Test<E> implements Int1 { // warning
public void m2(Integer...c){}
public void m1(Collection<Number> c){}
// public void m1(Collection c){} // Replacing above line with this compiles.
}
interface Int1<T> {
void m1(Collection <Number> c);
void m2(Integer...c);
}
import java.util.Collection;
class Test<E> implements Int1 { // warning
public void m2(Integer...c){}
public void m1(Collection<Number> c){}
// public void m1(Collection c){} // Replacing above line with this compiles.
}
interface Int1<T> {
void m1(Collection <Number> c);
void m2(Integer...c);
}