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 42877 - NPE when deleting a class in Projects view
Summary: NPE when deleting a class in Projects view
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Windows 3.1/NT
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks: 42880
  Show dependency tree
 
Reported: 2004-05-06 10:07 UTC by Jan Chalupa
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception stack trace (1.86 KB, text/plain)
2004-05-06 10:08 UTC, Jan Chalupa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Chalupa 2004-05-06 10:07:31 UTC
[refactoring build 040505; JDK 1.4.2_04]

1. Copied a simple Hello.java file in the Project
View using Copy / Paste (into the same package).
2. Hello_1.java was created -- the name of the
class  hasn't changed in the source, but I'm not
sure it's supposed to work that way at this point.
3. Tried to delete the pasted file using the 'Del'
key in the Project View
4. NPE was thrown (attached), file wasn't deleted.
Comment 1 Jan Chalupa 2004-05-06 10:08:18 UTC
Created attachment 14738 [details]
Exception stack trace
Comment 2 Jan Chalupa 2004-05-06 10:18:52 UTC
Additional info:

Popup-menu | Delete worked. The only problem was that the mouse cursor
changed to the busy state (arrow + hour glass) and stayed so, although
there didn't seem to be any background operation running.
Comment 3 Jan Becicka 2004-05-06 10:52:18 UTC
2. This is correct. You did a copy of file. No reason to change class
name.

It is strange, that the file was not deleted. I cannot reproduce it.
Attached exception shows, that ElementInfo for JavaClass is null -
this is a parser bug. 
Comment 4 Jan Becicka 2004-05-11 11:28:23 UTC
Root of the problem is, that some streams were not closed.

Fixed.

/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/Attic/ASTProvider.java,v
 <--  ASTProvider.java
new revision: 1.1.2.36.2.13; previous revision: 1.1.2.36.2.12
done
Processing log script arguments...
More commits to come...
Checking in JavaUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/Attic/JavaUpdater.java,v
 <--  JavaUpdater.java
new revision: 1.1.2.34.2.7; previous revision: 1.1.2.34.2.6
done
Comment 5 Jan Chalupa 2004-05-12 17:02:26 UTC
I'm not able to reproduce the problem with build from 20040511. Need
to say that I was never able to reproduce it reliably, but I believe
it's fixed now -- Verified.
Comment 6 psuk 2004-05-25 08:58:52 UTC
Setting Target Milestone to promoD