galileo - Type mismatch: cannot convert ... [message #260680] |
Wed, 17 June 2009 18:36  |
Eclipse User |
|
|
|
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 #260691 is a reply to message #260688] |
Thu, 18 June 2009 11:28  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06587 seconds