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.
NullPointerException was thrown when deleting java source file.
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.
Worked around in java module - reassigning to projects for evaluation & possibly fix.
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 :-(
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.
NPE is gone, the FileManipulation API should also help here (plugins in PM can be notified that PM is deleted, moved, etc.).
I reproduced it again, I'm ataching stack trace. Atached exception was thrown 6 times.
Created attachment 9509 [details] exc stack trace
Created attachment 11194 [details] Another two exceptions caught.
It seems like some problem in JavaDataObjectLook and JavaMember. (I couldn't reproduce the original NPE.)
Fixed in the JavaMember, however the NPE is sometimes also thrown from Project infrastructure. If found, please reopen this issue.
Verified.
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.