Re: Unchecked compiler warning



On Feb 24, 9:50 pm, Lew <l...@xxxxxxxxxxxxxxxxxxxx> wrote:
Lew wrote:
protected Vector<Canoe> canoes = new Vector<Canoe>();
John T wrote:

So are you assuming that there is a class called Canoe somewhere in
the OP's class structure?
Lew wrote:
Sure. Aren't you?
John T wrote:
I didn't see one so I thought *maybe I'm just stupid* that the Canoe
class wasn't written. That was the first thing I noticed... and it
failed for me in Eclipse but the error message I got wasn't the same as
that of the OP.

The OP clearly had not posted an SSCCE. His use of Canoe in his example was
clearly for pedagogical purposes. Ergo, since I didn't see the definition of
Canoe, I assumed it.

I have a maths degree. "Assume a spherical teacup. ... "

- Lew

Thanks for the correction. That has to do with the new generics in
Java 1.5, right?

I'm also sorry I didn't post the Canoe class. I wasn't thinking very
clearly and thought my example would compile to show the error. I was
also trying to post only a little portion of the code so that the
error would be easy to find.


.