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 6.1 Beta (Build 200803050202) 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) Create method hint is not provided if argument of missing method has bound generic type. Steps to reproduce: 1) have a code: public void test() { List<? extends Runnable> aa = null; nonExisting(aa); } -> no create method hint is provided
Max volunteered :)
This bug is a recurring pain for me, because my code has lots of parameters of type Class<?>. As a workaround, I temporarily delete the <?> or cast to a raw type Class, let the hint generate my method, and then add back the parameter. Seems like the kind of useless work that should be automated. (Also, it would be good to provide me a way of controlling where the inserted methods go; the default location is almost always wrong.)
Product Version: NetBeans IDE 7.1.1 (Build 201202271535) This is really very annoying. I hardly use ANY collections without generics so that this bug hits me more and more often. Just use the below class and check the quick hints. The first 2 work as expected, the foo(b) just report an error ... public class Test { public static void main(String[] args) { List<String> a; List<? extends String> b; foo(); // works to create method with quick hint foo(a); // works to create method with quick hint foo(b); // only reports an error } } PS: changed version to 7.1.1 and target to TBD
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss