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 10654 - Race condition in ClassNode
Summary: Race condition in ClassNode
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Other Other
: P3 blocker (vote)
Assignee: issues@java
URL: http://www.netbeans.org/www-nbdev/msg...
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-26 07:26 UTC by Svata Dedic
Modified: 2003-06-30 16:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2001-03-26 07:26:06 UTC
SourceChildren used by the ClassNode are initialized with SourceElement 
asynchronously. Children.findChild then fails to wait until the initialization 
is completed and returns null prematurely.
Comment 1 Michael Ottati 2001-03-26 20:20:27 UTC
It is not just Children.findChild. This fix also address the other mechanisms 
to find children.

The Children class supports the following additional methods which should also 
be addressed in this fix. 

nodes()
getNodes()
getNodesCount()
Comment 2 Svata Dedic 2001-03-27 05:46:58 UTC
Yes, but other Children methods just returns the current state. If nodes are
filled asynchronously (as for example the filesystem nodes), nodes() etc just
returns data available at the time of the call. There are situations where you
don't have fixed set of children, because they can change at any time.

findChild() is special because it is specific query and can (and should) be
handled specially by the data producer.
Comment 3 Svata Dedic 2001-04-02 16:23:54 UTC
Fixed in 3.2.19, dev-159. SourceChildren instance is attached to its 
SourceElement from the beginning of its existence.
Comment 4 Jan Chalupa 2001-05-05 20:18:55 UTC
Target milestone -> 3.2
Comment 5 Quality Engineering 2003-06-30 16:43:41 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.