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 57635

Summary: Fix Imports Not Always Deleting Line
Product: java Reporter: William Leonard <bleonard>
Component: UnsupportedAssignee: Daniel Prusa <dprusa>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description William Leonard 2005-04-07 18:45:11 UTC
When the Fix Imports feature deletes and import statement that is no longer
used, it also deletes the line containing that import statment, UNLESS, the
deleted import statment was at the bottom of the list of imports.
Comment 1 Tomas Hurka 2005-04-14 12:52:32 UTC
Dane, please look at it.
Comment 2 Tomas Hurka 2005-04-14 12:56:29 UTC
Some more information is available at http://weblogs.java.net/blog/bleonard/archive/2005/04/
netbeans_nyc_an_1.html
Comment 3 Tomas Hurka 2005-04-15 13:27:18 UTC
I just tried it and I was not able to reproduce it. Can you add more detailed steps how to reproduce it. 
Thanks.
Comment 4 William Leonard 2005-07-11 20:48:57 UTC
1) Create a new General Java Application project.
2) Add import java.io.*;
3) Run Fix Imports

The import will disappear, but its line will still be there. Hope this helps.

/Brian
Comment 5 Andrei Badea 2005-07-12 07:30:29 UTC
I experience this too. Dev build 050711, using bleonard's steps.
Comment 6 Milan Kubec 2005-07-12 08:59:18 UTC
Issue is complete now.
Comment 7 Daniel Prusa 2005-09-13 10:04:54 UTC
Fixed in main trunk.

Checking in ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  ResourceImpl.java
new revision: 1.96; previous revision: 1.95