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 28257 - CCE from V8FileEntry.ModifiedRegistry.stateChanged
Summary: CCE from V8FileEntry.ModifiedRegistry.stateChanged
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -S1S-
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-24 17:31 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attempted patch (879 bytes, patch)
2002-10-24 17:32 UTC, Jesse Glick
Details | Diff
Stack trace of CCE (1.44 KB, text/plain)
2002-10-24 17:42 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-10-24 17:31:59 UTC
This class in java-gj.jar has:

ModifiedRegistry() {
    DataObject.getRegistry().addChangeListener(this);
}
public void stateChanged(ChangeEvent evt) {
    Collection objs = (Collection)evt.getSource();
    // ...

Very bad. Javadoc for DO.R.aCL says only:

/** Add new listener to changes in the set of
modified objects.
 * @param chl listener to add
 */

Says nothing about the source of the change event
or what type it will be. If anything, you would
expect it to be the DO.R instance itself.

I tried to fix DO.ModifiedRegistry to use the DO.R
as the event source (see nbdev for more). But then
I get a CCE from the java module.

Attaching CCE and attempted patch. Please apply
the openide patch while fixing broken java module
code.
Comment 1 Jesse Glick 2002-10-24 17:32:38 UTC
Created attachment 7763 [details]
Attempted patch
Comment 2 Jesse Glick 2002-10-24 17:33:27 UTC
(The Javadoc certainly says nothing about the event source being
assignable to Collection!)
Comment 3 Jesse Glick 2002-10-24 17:42:08 UTC
Created attachment 7764 [details]
Stack trace of CCE
Comment 4 Svata Dedic 2003-01-08 15:16:57 UTC
Fixed in trunk.
Comment 5 Jan Becicka 2003-02-27 12:32:00 UTC
Reporter, could you verify this bug? Thanks
Comment 6 Jesse Glick 2003-02-27 21:07:58 UTC
I guess - haven't seen the exception since.