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 201505020001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb) If a method with different signatures is used in a code, a hint to add a static import is not available. Testcase: public class SampleTest { public void testToString() { String exp = ""; String result = toString(); assertEquals(exp, result); } public void testDouble() { double exp = 0.0; double result = 0.0; assertEquals(exp, result, 0.0); } } Try to call hint at any of "assertEquals" - you will be offered only to create method. Now remove any of "assertEquals" and call hint at the other - you will be offered to add imports. You may wonder why I didn't add import right after writing the first assertEquals - in this case the code with missing imports is an effect of bug 252173. But it could come from a simple copy-paste as well. It took me a while to find the reason and a reproducible testcase.
reproducible
Should be fixed by jet-main#c6a2e93402a0
Integrated into 'main-silver', will be available in build *201506050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/be3c03873125 User: Svata Dedic <sdedic@netbeans.org> Log: #252315: implemented import of overloaded method symbol
Verified with Build 201507240001.