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.
Convert class to static import hint produces invalid code. Steps to reproduce: 1) enable static import hint (JDK Migration Support) 2) have a code: public class NewClass { public static void main(String[] args) { String canonicalName = NewClass.class.getCanonicalName(); } } -> hint is provided in this case -> if applied: public class NewClass { public static void main(String[] args) { String canonicalName = class.getCanonicalName(); // <--- invalid code } } Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 1 Java: 1.7.0_75; Java HotSpot(TM) 64-Bit Server VM 24.75-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_75-b13 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\8.0.2 Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\8.0.2
fixed in jet-main#b19cfd6fd4d8
*** Bug 247045 has been marked as a duplicate of this bug. ***
Integrated into 'main-silver', will be available in build *201504230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b19cfd6fd4d8 User: Svata Dedic <sdedic@netbeans.org> Log: #250756: ignore .class, do not offer static import