Eclipse vs Javac difference

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Aug 26 17:11:26 PDT 2010


Stephen,

Have you tried versions of JDK, such as OpenJDK 6 or OpenJDK 7?

Can you boil the code down to a simple example which illustrates the 
different behavior?

-- Jon

On 08/26/2010 04:10 PM, Stephen Colebourne wrote:
> 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 -
> http://joda-primitives.svn.sourceforge.net/viewvc/joda-primitives/trunk/JodaPrimitives/?pathrev=30
>
> Running maven - mvn package - shows the problem (it compiles in
> Eclipse 3.5.0 and not in javac 1.6.0_13-b03)
>
> \dev\joda\primitives\src\test\java\org\joda\primitives\list\impl\AbstractTestBooleanList.java:[76,39]
> 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).
> Stephen
>    




More information about the compiler-dev mailing list