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 7586 - ClassElement.forName() does not find the ClassElement
Summary: ClassElement.forName() does not find the ClassElement
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC All
: P2 normal (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-09-05 18:44 UTC by Svata Dedic
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log with diagnostic messages that shows data and control flow for this bug. (14.20 KB, patch)
2001-07-20 20:30 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2000-09-05 18:44:05 UTC
If "synchronize implementation" is invoked from an IDL file, the CORBA module
tries to obtain the target ClassElement using
ClassElement.forName("someIdentifier").
The relevant DataObject exists, resides in a filesystem with COMPILE capability,
contains a compilable java source with the class being queried for.
Despite all of the above, forName() returns null that is really not expected by
the CORBA module and NPE occurs.
Comment 1 Svata Dedic 2000-09-06 20:31:59 UTC
It looks like a race condition from trace logs and testing. It may be because
of invalid usage of OpenAPIs by the CORBA module or by a race condition inside
Java module.
Comment 2 Svata Dedic 2000-09-07 12:18:59 UTC
The bug was caused by a race condition resulting from improper API usage. The
CORBA module first created an empty file, then it has written some contents into
it. The Java parser reacted faster, so it had grabbed the empty file before the
CORBA module filled it with some class definitions. Then, at the time when CORBA
module asked ClassElement.forName(), the implementation operated on obsolete
information returning null.
Please refer to the stacktraces attached for the exact control/data flow.
Comment 3 Svata Dedic 2000-09-07 12:20:59 UTC
Created attachment 136 [details]
Log with diagnostic messages that shows data and control flow for this bug.
Comment 4 Jan Becicka 2000-11-01 14:49:59 UTC
[1135] Verified
Comment 5 Quality Engineering 2003-07-01 13:19:05 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.