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 121447 - unnecessary import when moving class to another package
Summary: unnecessary import when moving class to another package
Status: RESOLVED DUPLICATE of bug 128830
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@java
Depends on:
Blocks: 152192
  Show dependency tree
Reported: 2007-11-08 10:50 UTC by damian_nb
Modified: 2009-03-04 13:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description damian_nb 2007-11-08 10:50:02 UTC
Create class

package TODO;

import TODO.*;
public class MyClass

There is no other class in package TODO, so this import ins not needed but valid.
Try to move this class to package test.array and observe result: import TODO.*; is not changed/removed so after
refactoring it does not compile becasue there is no class in package TODO so this import is not valid
Comment 1 Jan Becicka 2007-11-12 10:06:02 UTC
What build did you use? It should be fixed according to last comment in issue 119419.
Comment 2 damian_nb 2007-11-12 10:50:30 UTC
happens with 6.0 RC1
Comment 3 Jiri Prox 2007-11-12 13:07:37 UTC
I can reproduce it as well, but only if the import is unused. 
Steps to reproduce are in issue 114200

Product Version: NetBeans IDE 6.0 RC1 (Build 200711111200)
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)
Comment 4 Daniel Prusa 2008-03-04 13:32:48 UTC
still reproducible in 6.1, rather P4 then P3 since it is a corner case
Comment 5 Max Sauer 2009-03-04 13:56:03 UTC
Duplicate of #128830.

*** This issue has been marked as a duplicate of 128830 ***