I wanted to mention an issue I was having with Eclipse and the Atlas
codebase to hopefully save someone who also sadly uses Eclipse from
some wasted time. It seems like the Eclipse compiler doesn't agree
with the Mac JDK compiler concerning whether or not it is legal to do
something like:
public List<Foo> getStuff() {
List<? extends Foo> fooList = getFooList();
return fooList;
}
Specifically Eclipse complains (more than complains, says its an
error) that you need to explicitly cast fooList (of type List<?
extends Foo>) to List<Foo> in order to return it. The Maven build,
using the Mac JDK 1.6, thinks that's perfectly legal without the
cast. This construct comes up in
com.ning.atlas.plugin.StaticPluginSystem. Not exactly sure how to
make Eclipse happy except adding in the cast (yeah I could switch to
VI or Netbeans but I'd prefer not to) but I guess that my problem. I
tried 2 different Eclipse versions but no luck. Apparently I'm not
the first person with this problem:
http://code.google.com/p/jclouds/issues/detail?id=461
http://stackoverflow.com/questions/5633424/is-it-a-eclipse-or-maven-compiler-plugin-bug-the-generics-class-cast-issue