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 8.0 (Build 201403101706) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Given: public final class A { private static final Map<String, String> aMap = new LinkedHashMap<String, String>() { { put("a", "aaaaaa"); }; { put("b", "bbbbbb"); }; { put("c", "cccccccc"); }; }; // rest of class doesn't matter } The "put" lines will have the "Initializer can be static" hint. However if you click in the gutte and select "Make initializer static" the result is: public final class A { private static final Map<String, String> aMap = new LinkedHashMap<String, String>() { static { put("a", "aaaaaa"); }; { put("b", "bbbbbb"); }; { put("c", "cccccccc"); }; }; // rest of class doesn't matter } and the "static { put..." line is now highlighted with the error "Illegal static declaration in inner class..." (Note that this class should never have been initialized in this way in the firsts place. It doesn't need to be and shouldn't be an inner class, but still NB shouldn't offer to change it to illegal code.
reproducible
Fixed in jet-main#10299afe420b
Integrated into 'main-silver', will be available in build *201406190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/10299afe420b User: Svata Dedic <sdedic@netbeans.org> Log: #243478: fixed identification of generic types