Eclipse vs Javac difference

Stephen Colebourne scolebourne at
Thu Aug 26 16:10:47 PDT 2010

I'm currently seeing a difference between Eclipse and Javac and am
trying to determine who is at fault, and how to work around it.

The code in question is at Joda Primitives -

Running maven - mvn package - shows the problem (it compiles in
Eclipse 3.5.0 and not in javac 1.6.0_13-b03)

reference to iterator is ambiguous, both method iterator() in
org.joda.primitives.collection.BooleanCollection and method iterator()
in java.util.List<java.lang.Boolean> match

The code includes an interface BooleanCollection that extends
interface PrimitiveCollection, which extends Collection<Boolean>. The
iterator() method is overridden covariantly in BooleanCollection to
return BooleanIterator, a subinterface of PrimitiveIterator<Boolean>
and Iterator<Boolean>.

Any ideas? The svn repo is available to view (Apache 2 license).

More information about the compiler-dev mailing list