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 150773 - Fix Imports does not remove unused imports if they cannot be resolved
Summary: Fix Imports does not remove unused imports if they cannot be resolved
Status: RESOLVED DUPLICATE of bug 122658
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 20:59 UTC by matthies
Modified: 2009-02-19 21:08 UTC (History)
1 user (show)

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 matthies 2008-10-20 20:59:09 UTC
For example, if there is the import statement "import foo.Bar;" and there is no class foo.Bar in the classpath, and at 
the same time no type "Bar" is being used in the source file, then Fix Imports should remove the import just as any 
other unused import. In other words, unused imports should be removed regardless of whether they can be resolved or not.

Product Version: NetBeans IDE Dev (Build 200810181401)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Jan Lahoda 2008-10-27 07:41:45 UTC

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