You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2010/02/24 19:11:28 UTC

Re: Generics 5 - unexpected type, found: java.lang.Object expected: reference

> In fact I can compile it in eclipse with java 5, so this problem appears
> only when compiling with maven.
...
> I don't get this error under eclipse(neither under jd5 or jdk6) only
> when building with maven

Maven uses the compiler in your JDK while Eclipse uses its own
compiler. This is not a Maven issue but rather a difference between
the Eclipse compiler and Sun's compiler.

> if((Object)stack.getBean() instanceof String)
>
> Then it compiles OK both with jdk5 and jdk6. but this is both ugly and dirty

I'd do this if it works.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Generics 5 - unexpected type, found: java.lang.Object expected: reference

Posted by milan chudik <mi...@delfidata.no>.
Thanks guys,

I wasn't aware of eclipse and its' compile routines.

milan

On 24/02/10 19:11, Wayne Fay wrote:
>> In fact I can compile it in eclipse with java 5, so this problem appears
>> only when compiling with maven.
>>     
> ...
>   
>> I don't get this error under eclipse(neither under jd5 or jdk6) only
>> when building with maven
>>     
> Maven uses the compiler in your JDK while Eclipse uses its own
> compiler. This is not a Maven issue but rather a difference between
> the Eclipse compiler and Sun's compiler.
>
>   
>> if((Object)stack.getBean() instanceof String)
>>
>> Then it compiles OK both with jdk5 and jdk6. but this is both ugly and dirty
>>     
> I'd do this if it works.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>   


-- 
Med vennlig hilsen/Regards,

Milan Chudík

Fjøsangerveien 50
5892 Bergen
Norway
Mob. : +47 90094542
Tel. : +47 55209617
e-mail : milan.chudik@delfidata.no 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org