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.
Product Version: NetBeans IDE Dev (Build 20080228044232) Java: 1.6.0_10-ea; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb) Refactoring does not respect bound generic type. It changes the type to super type regardless on restriction given by generic type. Steps to reproduce: 1) have class SubClass with method subMethod() extending SuperClass 2) have a class Test: public class Test { public void method() { SubClass sub = new SubClass(); action(sub); } public <T extends SubClass> void action(T input) { input.subMethod(); } } 3) call Use Supertype on SubClass -> type of 'sub' changed to SuperType but declaration of method action() does not allow it.
reproducible
please take a look at this one. Thanks
Changeset: 135e539202d2 Author: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Date: 2011-09-08 11:46 Message: Issue #128676 - [Use Supertype] Refactoring does not respect bound generic type
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/135e539202d2 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: Issue #128676 - [Use Supertype] Refactoring does not respect bound generic type