On 9 Apr 2008, at 14:32, Timo Rantalaiho wrote:
"It is possible that future versions of the Java
programming language will disallow the use of raw types."
http://java.sun.com/docs/books/jls/third_edition/html/
typesValues.html#110257
Wow very interesting. Thanks, didn't know that.
Furthermore, if you have
public class DropDownChoice<T> ... {
...
public DropDownChoice(String id, IModel<T> default, List<T>
choices)
you cannot just use the type for the model and skip it for
the Component; AFAIK this does not work:
DropDownChoice<?> fooSelection = new DropDownChoice<?>
("fooSelection",
new Model<Foo>(foo), fooList);
AFAIK you can do this:
DropDownChoice fooSelection = new DropDownChoice("fooSelection",
new Model<Foo>(foo), fooList);
But with a warning in Eclipse. But considering that "use of raw
types in code written after the introduction of genericity into the
Java programming language is strongly discouraged" I guess its best
not to do that!
John