Community
Participate
Working Groups
Build ID: 20090611-1022 3.5 RC4 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" More information: Installed 3.5RC4 and attempted to build a project that builds without errors in 3.4, and using command line javac from JDK 1.5, and 1.6. The Eclipse compiler is generating errors on statements that to not get errors when building in Eclipse 3.4, and when building with JDK 1.6.0_14. The problem was originally posted in the tools.jdt newsgroup. Text of the original post is at the end of this report. The following line gets the error: BillingItem result = ComponentFactory.getComponent(BillingItem.class, owner); We have a ComponentFactory class that returns objects of a requested type. The first parameter of the getComponent method is a Class of the desired type. The getComponent method declares the return type using generics notation. 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? Let me know how much more info you need to investigate.
Could you please provide a complete test case that worked with 3.4 and now failed with 3.5?
Michael - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643#c6 *** This bug has been marked as a duplicate of bug 277643 ***
Verified for 3.6M1
(In reply to comment #3) > Verified for 3.6M1 What exactly does "Verified for 3.6M1" imply? This bug was marked as a duplicate of 277643, and the comments in that bug indicate the compiler is correct and that it will not be fixed.
(In reply to comment #4) > (In reply to comment #3) > > Verified for 3.6M1 > What exactly does "Verified for 3.6M1" imply? That it was verified to be a duplicate at the 3.6 M1 milestone release time.