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 13585 - ClassCastException after click on package in "Objects" window.
Summary: ClassCastException after click on package in "Objects" window.
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-13 13:17 UTC by Robert Dankanin
Modified: 2008-12-23 09:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thrown ClassCastException (1.06 KB, text/plain)
2001-07-13 13:21 UTC, Robert Dankanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Dankanin 2001-07-13 13:17:43 UTC
[Main trunk build #200107130100]

1. Start new build in multiuser mode (so that "sampledir" directory with examples will be mounted)
2. Switch to "Browsing" WS.
3. Click on "Examples" package in "Packages" window in [Object Browser].
4. Subpackages of "Examples" package will appear in "Objects" window of [Object Browser]
5. Click on some of these packages listed in "Objects" window of [Object Browser]

-> java.lang.ClassCastException: org.netbeans.modules.objectbrowser.ClassBrowserHierarchyTranslator$MemberFilter
will appear.

Note, that earlier before builds 
      [Main trunk build #200107130100]
      [Main trunk build #200107120100]
it wasn't possible to list sub-packages in "Objects" window.

Perhaps filtering could change with new Projects implementation, please consult with Projects guys if neccessary or reassign.
Comment 1 Robert Dankanin 2001-07-13 13:21:44 UTC
Created attachment 1867 [details]
thrown ClassCastException
Comment 2 Petr Suchomel 2001-08-20 13:21:28 UTC
I investigated problem
    public DataObjectFilter () {
        this (new Class [] {});
        DataLoader[] loaders = TopManager.getDefault ().getLoaderPool 
().toArray ();
        int i, k = loaders.length;
        for (i = 0; i < k; i++) {
            Class c = loaders [i].getRepresentationClass ();
            if (DataFolder.class.isAssignableFrom (c)) continue;
            acceptedDOs.put (c, c);
        }
    }

Array of loaders includes variable which is instanceof DataObject,
so in acceptedDOs is included DataObject, due to this filtering does 
not work.
Comment 3 Jan Zajicek 2001-08-21 10:45:15 UTC
Assigning to Vita.
Comment 4 Vitezslav Stejskal 2001-08-21 14:31:46 UTC
Data loader org.netbeans.core.windows.layers.WSLoader declares 
'DataObject' as its representation class. It seems that it causes 
problems in objects filtering, please use more specific representation 
class.
Comment 5 mslama 2001-10-04 10:58:30 UTC
Fixed: I changed representation class of 
org.netbeans.core.windows.layers.WSLoader from DataObject to
org.netbeans.core.windows.layers.WindowManagerData.
Comment 6 Lukas Hasik 2002-01-07 14:58:19 UTC
gone for long time...