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.

Bug 227532 - [Move members] It is possible to move enum constants
Summary: [Move members] It is possible to move enum constants
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-15 14:46 UTC by Jiri Prox
Modified: 2013-08-29 12:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2013-03-15 14:46:40 UTC
It is possible to move enum constants which produces invalid code

Steps to reproduce:
1) have a inner enum

public class Test { 
  enum En {
     A,B;
  }
}

2) use move refactoring to move A,B to another locations

-> the generated code is 

public static final En V = new Test.En();
public static final En A = new Test.En();



Product Version: NetBeans IDE 7.3 (Build 201303141828)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b19
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b78
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.3
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.3
Comment 1 Ralph Ruijs 2013-03-15 16:18:54 UTC
Nice catch !
Comment 2 Ralph Ruijs 2013-05-27 11:55:23 UTC
changeset:   9a8e50f81a7e
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Wed May 22 12:37:53 2013 +0200
summary:     #227532 - [Move members] It is possible to move enum constants
Comment 3 Quality Engineering 2013-05-28 14:14:21 UTC
Integrated into 'main-golden', will be available in build *201305281155* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9a8e50f81a7e
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #227532 - [Move members] It is possible to move enum constants
Comment 4 Jiri Prox 2013-08-29 12:51:46 UTC
v.