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 121353 - [Move Inner to Outer] Invalid import is added when moving enum
Summary: [Move Inner to Outer] Invalid import is added when moving enum
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks: 152192
  Show dependency tree
 
Reported: 2007-11-07 10:42 UTC by Jiri Prox
Modified: 2009-03-04 15:36 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 2007-11-07 10:42:51 UTC
Product Version: NetBeans IDE Dev (Build 20071107013858)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b06
System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb)

Invalid import is added to the new class when moving inner enum to separate file.

Steps to reproduce:
1) have a class:
public class NewClass {       
    enum A {
        A,B,C;
    }
}

2) use 'Move Inner to Outer' refactoring on enum A 
-> file A is created with this content:

package javaapplication1;

import javaapplication1.NewClass.A;  // <- A is not in NewClass anymore

enum A {

    A, B, C
}
Comment 1 Jan Becicka 2007-11-15 15:16:11 UTC
This invalid import is added automatically by import management.
Comment 2 Max Sauer 2009-03-04 15:36:35 UTC
Not reproducible for me anymore, probably fixed.
---
Product Version: NetBeans IDE Dev (Build 090303)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.6 running on i386; MacRoman; en_US (nb)