Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » galileo - Type mismatch: cannot convert ...
galileo - Type mismatch: cannot convert ... [message #260680] Wed, 17 June 2009 18:36 Go to next message
Eclipse UserFriend
Installed 3.5 RC4. Project that builds in 3.4 is getting compile errors
building with 3.5 RC4 : "Type mismatch: cannot convert from Component to
BillingItem"

The following line gets the error:
BillingItem result =
ComponentFactory.getComponent(BillingItem.class, owner);


The method being called is:
public static <D extends DAO<?>,T extends Component<D, ? extends
PrimaryKey<?>>> T getComponent(
Class<T> component,
Component<? extends DAO<?>, ? extends PrimaryKey<?>> parent)
{
T result = newInstance(component, parent.environment);
result.setOwner(parent);
return result;
}


Note that the method accepts a 'component' parameter of type Class<T> that
should result in the correct type being returned.

Can anyone explain why this is now causing compile error in Eclipse 3.5?
Re: galileo - Type mismatch: cannot convert ... [message #260688 is a reply to message #260680] Thu, 18 June 2009 10:44 Go to previous messageGo to next message
Eclipse UserFriend
I have compiled the project with JDK 1.6.0_14 and do not get this error.
Based on this, it would be an issue with the compiler being used in
Eclipse.

Is it possible to disable the internal compiler and force Eclipse to use a
JDK version?
Re: galileo - Type mismatch: cannot convert ... [message #260691 is a reply to message #260688] Thu, 18 June 2009 11:28 Go to previous message
Eclipse UserFriend
Michael Giroux wrote:
> I have compiled the project with JDK 1.6.0_14 and do not get this
> error. Based on this, it would be an issue with the compiler being
> used in Eclipse.
>
> Is it possible to disable the internal compiler and force Eclipse to
> use a JDK version?
Not that easily. You would loose all benefits and you have to do this
via ant task. Please file a bug report against JDT Core, so they can
look at this.

Dani
Previous Topic:Search engine
Next Topic:Code completion on 3.5
Goto Forum:
  


Current Time: Thu Jul 17 22:22:54 EDT 2025

Powered by FUDForum. Page generated in 0.06587 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top