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 72891 - [Copy Class] Unnecessary import added
Summary: [Copy Class] Unnecessary import added
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: 2006-02-21 16:20 UTC by Jiri Prox
Modified: 2009-02-19 22:58 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 Jiri Prox 2006-02-21 16:20:51 UTC
NB 6.0 200602191900
JDK 1.5.0_06
Ex. refactoring

1) Unnecessary import statement added when copying class to the same package:
- have a class A in package p
- copy class A to class B in the package p
-> useless import p; added to newly created class B

2) Import is doubled if thre is one in the copied class
- have a class A in package p containig import p;
- copy class A to class B in another package
- statement import p; is added -> the same import is twice in new class
Comment 1 Max Sauer 2009-02-16 10:21:54 UTC
This is a WONTFIX -- I cannot reproduce the first one and the second is really a cornercase.