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 29202 - NPE when deleting java source file
Summary: NPE when deleting java source file
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-02 10:54 UTC by Milan Kubec
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc stack trace (811 bytes, text/plain)
2003-03-25 09:46 UTC, Milan Kubec
Details
Another two exceptions caught. (3.63 KB, text/plain)
2003-08-03 12:52 UTC, Vitezslav Stejskal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2002-12-02 10:54:50 UTC
NullPointerException was thrown when deleting java
source file.
Comment 1 Svata Dedic 2002-12-02 17:41:37 UTC
This issue (and possibly some others, too) are caused by projects
infrastructure removing services from ProjectMember.getEnvironment()
when the DataObject is deleted.

Is it really necessary ? I can not reliably communicate the deletion
to my services in the PM.getEnvironment() and would like to know
whether I should change all relevant code.
Comment 2 Svata Dedic 2002-12-03 14:02:08 UTC
Worked around in java module - reassigning to projects for evaluation
& possibly fix.
Comment 3 Vitezslav Stejskal 2002-12-03 14:38:07 UTC
Please, attach the stacktrace. I need to see where the exception
occured before I can help. (Moreover with Svata's workaround the NPE
is no longer reporoducible :-(
Comment 4 Vitezslav Stejskal 2003-02-06 14:09:08 UTC
Svato, I think you shouldn't pass invalid ProjectMembers to your
services or if the service already has some ProjectMember that it
should throw it away when the PM is deleted and/or invalidated.

I still tend to clean up the environment of the PM when it gets
invalid (e.g. by deletion or because its project is colsed), otherwise
I can't asure that projects data will get reclaimed after the project
is closed.
Comment 5 Vitezslav Stejskal 2003-03-17 13:17:46 UTC
NPE is gone, the FileManipulation API should also help here (plugins
in PM can be notified that PM is deleted, moved, etc.).
Comment 6 Milan Kubec 2003-03-25 09:45:36 UTC
I reproduced it again, I'm ataching stack trace. Atached exception was
thrown 6 times.
Comment 7 Milan Kubec 2003-03-25 09:46:18 UTC
Created attachment 9509 [details]
exc stack trace
Comment 8 Vitezslav Stejskal 2003-08-03 12:52:24 UTC
Created attachment 11194 [details]
Another two exceptions caught.
Comment 9 Vitezslav Stejskal 2003-08-03 12:54:23 UTC
It seems like some problem in JavaDataObjectLook and JavaMember. (I
couldn't reproduce the original NPE.)
Comment 10 Tomas Zezula 2003-08-20 14:59:00 UTC
Fixed in the JavaMember, however the NPE is sometimes also thrown from
Project infrastructure. If found, please reopen this issue.
Comment 11 Milan Kubec 2003-08-25 09:20:18 UTC
Verified.
Comment 12 Jan Becicka 2003-11-25 14:22:19 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as CLOSED.