charmae
charmae

Reputation: 1080

Java generics ECLIPSE bug?

Is this a bug or what?

enter image description here

Im using Eclipse and I keep getting this warning. Whats wrong with this...

enter image description here

Upvotes: 4

Views: 169

Answers (2)

meriton
meriton

Reputation: 70564

What you see is a compilation error, not a mere warning (a warning would not cause compilation to fail).

And no, its very unlikely to be a bug in eclipse. Probably, the type List really doesn't declare any type parameters, because you have imported java.awt.List instead of java.util.List.

Upvotes: 6

orien
orien

Reputation: 2200

Check which List class you've imported. You've probably imported java.awt.List.

Upvotes: 10

Related Questions