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 9728 - NPE from DataFolder.refresh
Summary: NPE from DataFolder.refresh
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: akemr
URL: http://ffjbuilder.czech.sun.com:8080/...
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-20 18:59 UTC by Jesse Glick
Modified: 2008-12-22 21:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
First start log with exception (8.61 KB, text/plain)
2001-02-20 19:01 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-02-20 18:59:53 UTC
Happened during first start of FFJIE. My guess (Jarda thinks so too): the NPE is
thrown from list.SOMEMETHOD(), so list must be null. But list is assigned to a
clearly non-null value in DataFolder constructor, is private, and is only
reassigned in handleMove (where its new value also cannot be null, because it is
coming from another DataFolder, and it was dereferenced too). So perhaps
DataFolder.refresh() is being called before the DataFolder constructor finished,
which is possible since we are throwing around a this-reference to who knows
what code from the constructor.

DataObjectPool.toNotify (says Jarda) will tell you if a given object has
finished its constructor yet or not. So maybe somebody should try to not refresh
folders listed here. Consider this a org.openide.loaders maturita. :-)
Comment 1 Jesse Glick 2001-02-20 19:01:06 UTC
Created attachment 649 [details]
First start log with exception
Comment 2 akemr 2001-02-21 10:55:04 UTC
I tried to fix it (but I couldn't reproduce this behaviour). Fix will be in 
next dev build - #132
Change is in DataObjectPool.refreshAllFolders method:
Folders listed in toNotify collection won't be refreshed more, because they 
creation isn't finished yet.
Comment 3 Marian Mirilovic 2002-04-19 15:37:48 UTC
closed