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.
[ BUILD # : 200808260201 ] [ JDK VERSION : 1.6.0_07 ] Product Version: NetBeans IDE Dev (Build 200808260201) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 10.0-b23 System: Linux version 2.6.26-1.slh.3-sidux-amd64 running on amd64; UTF-8; en_US (nb) Userdir: /home/sasbeb/.netbeans/dev Since Java doesn't allow covariant return types, when I overload/override a method, the code completion/automatic imports should pick the right class to import. That is if I have class A such that: class A extends JComponent { public Dimension getPrefferredSize() { return new Dimension(5, 4); } } and there are Dimension classes in packages like: java.awt.Dimension foo.bar.bar.Dimension bar.Dimension bar.bar.bar.Dimension The only valid import is java.awt.Dimension since that is the only valid class that can return from getPreferredSize
This is good idea, but IMHO it's rather enhancement than a bug