The unchecked warning in the program below is not mandated by
the spec.
import java.util.*;
class Model<T> {
public List<String> getContent() { return null; }
public static void main(String[] args) {
Model m = null;
List<String> l = m.getContent(); // <-- unchecked warning!
}
}
See: http://forum.java.sun.com/thread.jspa?threadID=609333&messageID=3336600#3336600
###@###.### 2005-03-22 18:13:54 GMT
the spec.
import java.util.*;
class Model<T> {
public List<String> getContent() { return null; }
public static void main(String[] args) {
Model m = null;
List<String> l = m.getContent(); // <-- unchecked warning!
}
}
See: http://forum.java.sun.com/thread.jspa?threadID=609333&messageID=3336600#3336600
###@###.### 2005-03-22 18:13:54 GMT
- duplicates
-
JDK-6361010 compile discards type information for generic method called on raw-typed object
-
- Closed
-
-
JDK-6360753 Generics problem with interface implementation
-
- Closed
-