> I disagree that this is a stupid and useless warning. In > fact it *should* be a compile error, and it would be if > Sun weren't concerned that 1.4 code interoperate with > generified 1.5 libraries without changes. Consider: > <pre> > List foo = new ArrayList(); > foo.add(new Integer(1)); > List<String> oops = foo; //warning, you've just pwnd the > he type system > </pre>
Irrelevant, this is NOT what I wrote. There is no way you can add an Integer in my example. It is a stupid and useless warning.
Your example is just plain bad code (which you intended it to be, not a knock on you) for a lot of reasons, and you can't stop bad code.
Flat View: This topic has 370 replies
on 371 pages
[
«
|
121314151617181920
|
»
]