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.
Summary: | Create method is not provided if argument of missing method has bound generic | ||
---|---|---|---|
Product: | java | Reporter: | Jiri Prox <jiriprox> |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 7.1.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jiri Prox
2008-03-05 14:29:52 UTC
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 |