Community
Participate
Working Groups
Hi! This example covers two problems of Eclipse 3.1M6. The following code contains and internal class "MyInterfaceImpl" implementing the interface "MyInterface". If you leave out the necessary implementation of the method and ask Eclipse to generate a default implementation (as a solution for the error), the shown method will be generated: public <A extends Object & Data> void copyData(A data) { although the signature should be public <A extends Data> void copyData(A data) { Furthermore, the generated code does compile with Eclipse, Although it does not compile with the Javac compiler JDK 1.5 (update 2) public class ExtendedGenericMethodSignature { public interface Data { } public interface MyInterface { public <A extends Data> void copyData(A data); } public class MyInterfaceImpl implements MyInterface { public <A extends Object & Data> void copyData(A data) { } } } Javac says: ExtendedGenericMethodSignature.MyInterfaceImpl is not abstract and does not override abstract method <A>copyData(A) in ExtendedGenericMethodSignature.MyInterface.
Verified that the generated code is now as expected. However we still have a different behavior than javac.
Method verifier issue.
+1 for 3.2RC2
Added MethodVerifier test86
Verified with I20060427-1600 for 3.2RC2