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 90431 - Remove redundant imports after move
Summary: Remove redundant imports after move
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
Depends on:
Blocks: 152192
  Show dependency tree
Reported: 2006-12-01 13:33 UTC by Jiri Prox
Modified: 2009-09-08 13:40 UTC (History)
1 user (show)

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 Jiri Prox 2006-12-01 13:33:47 UTC
NetBeans IDE Dev (Build 061201)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b104
Windows XP version 5.1 running on x86
en_US (nb); Cp1252

Redundant import should be removed (not added) when Refactoring | Move is performed

Use case:
1) have two classes ClassA and ClassB extends ClassA  in the same package (pack1)
2) move ClassA to different package (pack2)
-> import pack2.ClassA; is added to ClassB, that's ok
3)move ClassA back
-> another import pack1.ClassA; is added to ClassB, and the second import is 
also changed (pack2-> pack1) so there are two identical imports
Comment 1 Jiri Prox 2007-09-17 21:32:10 UTC
Obsolete milestone, please reevaluate
Comment 2 Jan Becicka 2008-11-10 15:54:12 UTC
Let's try to fix it for 7.0 or close it.
Comment 3 Max Sauer 2009-09-08 13:40:27 UTC
This has been already fixed, works OK in
Product Version: NetBeans IDE Dev (Build 200909040632)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02-83
System: Mac OS X version 10.5.7 running on x86_64; MacRoman; en_US (nb)