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 201705050001) Java: 1.8.0_131; Java HotSpot(TM) 64-Bit Server VM 25.131-b11 Steps to reproduce: Create two classes: CStatus (will be used as move target) and Status enum class with next code: Undefined(0xFFFFFFFFL), OK(0L), False(1L); private final Long value; public Long getValue() { return value; } Status(Long value) { this.value = value; } Invoke move to Type refactoring. See errors: 1. IDE misses semicolumn afer first line 2. IDE added unexpected super(); call in class constructor 3. IDE cannot completely Undo this refactoring. On call Undo code added to target file cleans but previous file Status is not restores also constant value for Undefined unexpectedly converted to decimal view
I filed enhancement issue #270946 to cover the re-generation of the constant and possible others. The code causing the defect relates to issue #218495; removing it does not cause regresion and execution even do not stop in the touched code at all: the case is already handled elsewhere, so removing the special case actually activates code in doAccept which prints trailing semicolon properly. Code breakage fixed by jet-main#268895
Integrated into 'main-silver', will be available in build *201706250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d1ecf42c54cd User: Svata Dedic <sdedic@netbeans.org> Log: #270670: removed special case, field group are processed in doAccept.