This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
dev build 200502211900 When I run TOOLS | Synchronize I get a whole bunch of methods that I am asked to add, but I know for a fact that the superclass already implements them. Furthermore, compiling the file works fine so I know that "synchronize" is wrong. I am not 100% sure what is special about these methods that confuses the synchronize tool but here is roughly what I am doing: interface MyInterface <Type extends MyInterface<Type>> { public void add(Type child); } public abstract class AbstractClass<Type extends AbstractClass<Type>> implements MyInterface { public void add(Type child) { } } public class ConcreteClass<Type extends ConcreteClass<Type>> extends AbstractClass { } If you run "synchronize" on ConcreteClass, it will suggest adding: public void add(Object child); This seems to be Generics specific and has something to do with type-erasure because if I have methods such as: public void add(Set<Type> children); it won't show up as missing on synchronize.
Reassigning to java module.
I am confused with your example a bit. Why do you introduce generics in your code (MyInterface<Type ...> and AbstractClass<Type ...>) when you do not use them. Declarations like this: abstract class AbstractClass<Type ...> implements MyInterface {} or this: class ConcreteClass<Type ...> extends AbstractClass {} simply erase generic type information of the superclass or interface. Is it intention or the following declarations are what you want? abstract class AbstractClass<Type ...> implements MyInterface<Type> {} class ConcreteClass<Type ...> extends AbstractClass<Type> {} Nevertheless there is definitely a bug since the Synchronize and the Override method tools have to suggest not public void add(Object child) but public void add(MyInterface child) as the MyInterface is the type the compiler translates <Type extends MyInterface<Type>> to.
You are right, there was a typo in my original code. It should have read: public abstract class AbstractClass<Type extends AbstractClass<Type>> implements MyInterface<Type>
Tools->Synchronize was removed. This bug is not valid any more.