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.
There is no warning when replacing enum constructor with factory. Steps to reproduce: 1) have a code: public enum Enum { A(1); private Enum(int x) { } } 2) replace constructor with factory -> public enum Enum { A(1); private static Enum create(int x) { return new Enum(x); // <--- here is error : Enum types cannot be instantiated } private Enum(int x) { } } Product Version: NetBeans IDE Dev (Build 201211120001) Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b15 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Changeset: a731c4302e42 Author: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Date: 2012-11-13 15:18
Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a731c4302e42 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: Issue #221949 - [Replace constructor with factory] No warning when refactoring enum constructor