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 28365 - java.lang.ClassCastException in object browser
Summary: java.lang.ClassCastException in object browser
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -FFJ-
Hardware: All All
: P3 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
: 28620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-30 19:41 UTC by kishm
Modified: 2010-09-23 09:14 UTC (History)
0 users

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 kishm 2002-10-30 19:41:23 UTC
FULL PRODUCT VERSION :
See System Info

>System Info:
  Product Version       = Forte for Java 4,
Community Edition (Build 020521)
  IDE Versioning        = IDE/1 spec=1.43.3
impl=020521
  Operating System      = Windows 2000 version
5.0 running on x86
  Java; VM; Vendor      = 1.4.0_02; Java HotSpot
(TM) Client VM 1.4.0_02-b02; Sun Microsystems
Inc.
  Java Home             = C:\j2sdk1.4.0_02\jre
  System Locale; Encod. = en_US; Cp1252
(f4j_ce)
  Home Dir; Current Dir =
C:\WINNT\Profiles\spobrien;
C:\forte_jdk\forte4j\bin
  IDE Install; User Dir = C:\forte_jdk\forte4j;
c:\isdp
  CLASSPATH             =
C:\forte_jdk\forte4j\lib\patches\openide-
compat.jar;C:\forte_jdk\forte4j\lib\locale\core_f4j.ja
r;C:\forte_jdk\forte4j\lib\locale\core_f4j_ce.jar;C:\fo
rte_jdk\forte4j\lib\locale\openide_f4j.jar;C:\forte_jd
k\forte4j\lib\core.jar;C:\forte_jdk\forte4j\lib\openide
.jar;C:\forte_jdk\forte4j\lib\ext\locale\rmi-
ext_ja.jar;C:\forte_jdk\forte4j\lib\ext\bsh-1_0-
fj.jar;C:\forte_jdk\forte4j\lib\ext\cmd.jar;C:\forte_jd
k\forte4j\lib\ext\crimson.jar;C:\forte_jdk\forte4j\libext\d
dl.jar;C:\forte_jdk\forte4j\lib\ext\fjscript.jar;C:forte_jd
k\forte4j\lib\ext\idlcompilers.jar;C:\forte_jdk
\forte4j\lib\ext\jaas.jar;C:\forte_jdk\forte4j\lib\ext\jc
ert.jar;C:\forte_jdk\forte4j\lib\ext\jh.jar;C:\forte_jdkfor
te4j\lib\ext\jnet.jar;C:\forte_jdk\forte4j\lib\ext\jss
e.jar;C:\forte_jdk\forte4j\lib\ext\logger.jar;C:\forte_j
dk\forte4j\lib\ext\openorb-
1.0.2.jar;C:\forte_jdk\forte4j\lib\ext\parser.jar;C:\for
te_jdk\forte4j\lib\ext\pbclient.jar;C:\forte_jdk\forte4
j\lib\ext\regexp.jar;C:\forte_jdk\forte4j\lib\ext\rmi-
ext.jar;C:\forte_jdk\forte4j\lib\ext\terminalemulator.
jar;C:\forte_jdk\forte4j\lib\ext\xerces.jar;C:\forte_jd
k\forte4j\lib\ext\jdbc20x.zip;C:\j2sdk1.4.0_02
\lib\dt.jar;C:\j2sdk1.4.0_02\lib\tools.jar

EXTRA RELEVANT SYSTEM CONFIGURATION :
All updates installed from Update Center

A DESCRIPTION OF THE PROBLEM :
WEB-INF folder does not displace members
when viewed through the object browser.
Exception occurs.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.  Create a simple applet and an html page and
run the applet in the web browser, thus creating
a WEB-INF folder in the current directory.
2.  Open Forte object browser
3. Click on package e.g. "Hello World"
4.  Click on WEB-INF subfolder in Objects
window (created by running the web page)
5.  Observe the error.

EXPECTED VERSUS ACTUAL BEHAVIOR :
expected:  Observe the contents of WEB-INF in
the members window.
actual:  Observe the error message:

ERROR MESSAGES/STACK TRACES THAT OCCUR :
*********** Exception occurred ************
Fri Sep 13 14:21:03 EDT 2002:
java.lang.ClassCastException:
org.netbeans.modules.objectbrowser.ClassBrows
erHierarchyTranslator$MemberFilter
java.lang.ClassCastException:
org.netbeans.modules.objectbrowser.ClassBrows
erHierarchyTranslator$MemberFilter
	at
org.netbeans.modules.objectbrowser.ClassBrows
erHierarchyTranslator.getHierarchyForPackage
(ClassBrowserHierarchyTranslator.java:249)
	at
org.netbeans.modules.objectbrowser.ClassBrows
erHierarchyTranslator.translate
(ClassBrowserHierarchyTranslator.java:168)
	at
org.netbeans.modules.objectbrowser.ExplorerBea
n.refreshNodes(ExplorerBean.java:431)
	at
org.netbeans.modules.objectbrowser.ExplorerBea
n.dataItemAvailable(ExplorerBean.java:543)
	at
javax.infobus.DefaultController.fireItemAvailable
(DefaultController.java:90)
	at
javax.infobus.InfoBus.fireItemAvailable
(InfoBus.java:995)
	at
org.netbeans.modules.objectbrowser.ExplorerBea
n$1.propertyChange(ExplorerBean.java:141)
	at
java.beans.PropertyChangeSupport.firePropertyC
hange(PropertyChangeSupport.java:252)
	at
org.openide.explorer.ExplorerManager.setSelecte
dNodes(ExplorerManager.java:204)
	at
org.openide.explorer.view.ListView.selectionChan
ged(ListView.java:360)
	at
org.openide.explorer.view.ListView$Listener.value
Changed(ListView.java:741)
	at
javax.swing.DefaultListSelectionModel.fireValueC
hanged(DefaultListSelectionModel.java:187)
	at
javax.swing.DefaultListSelectionModel.fireValueC
hanged(DefaultListSelectionModel.java:167)
	at
javax.swing.DefaultListSelectionModel.fireValueC
hanged(DefaultListSelectionModel.java:214)
	at
javax.swing.DefaultListSelectionModel.changeSel
ection(DefaultListSelectionModel.java:402)
	at
javax.swing.DefaultListSelectionModel.changeSel
ection(DefaultListSelectionModel.java:411)
	at
javax.swing.DefaultListSelectionModel.setSelecti
onInterval(DefaultListSelectionModel.java:435)
	at
javax.swing.JList.setSelectionInterval
(JList.java:1603)
	at
javax.swing.plaf.basic.BasicListUI$MouseInputHa
ndler.adjustFocusAndSelection
(BasicListUI.java:1332)
	at
javax.swing.plaf.basic.BasicListUI$MouseInputHa
ndler.mousePressed(BasicListUI.java:1294)
	at
java.awt.AWTEventMulticaster.mousePressed
(AWTEventMulticaster.java:218)
	at
java.awt.AWTEventMulticaster.mousePressed
(AWTEventMulticaster.java:217)
	at
java.awt.AWTEventMulticaster.mousePressed
(AWTEventMulticaster.java:217)
	at
java.awt.Component.processMouseEvent
(Component.java:5018)
	at java.awt.Component.processEvent
(Component.java:4818)
	at java.awt.Container.processEvent
(Container.java:1525)
	at
java.awt.Component.dispatchEventImpl
(Component.java:3526)
	at
java.awt.Container.dispatchEventImpl
(Container.java:1582)
	at java.awt.Component.dispatchEvent
(Component.java:3367)
	at
java.awt.LightweightDispatcher.retargetMouseEve
nt(Container.java:3359)
	at
java.awt.LightweightDispatcher.processMouseEve
nt(Container.java:3071)
	at
java.awt.LightweightDispatcher.dispatchEvent
(Container.java:3004)
	at
java.awt.Container.dispatchEventImpl
(Container.java:1568)
	at java.awt.Window.dispatchEventImpl
(Window.java:1581)
	at java.awt.Component.dispatchEvent
(Component.java:3367)
	at java.awt.EventQueue.dispatchEvent
(EventQueue.java:445)
[catch] at
java.awt.EventDispatchThread.pumpOneEventFor
Hierarchy(EventDispatchThread.java:191)
	at
java.awt.EventDispatchThread.pumpEventsForHie
rarchy(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:138)
	at
java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:130)
	at java.awt.EventDispatchThread.run
(EventDispatchThread.java:98)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

/** wrgrwg
 */
public class ClickMe extends Applet implements
MouseListener {
    private Spot spot = null;
    private static final int RADIUS = 7;
    
    /** dgferg
     */
    public void init() {
        addMouseListener(this);
    }
    
    //* fjlagj */
    /** fdagqreg
     * @param g dsajdhfkdahflk
     */
    public void paint(Graphics g) {
        g.setColor(Color.white);
        g.fillRect(0,0,getSize().width - 1, getSize
().height -  1);
        g.setColor(Color.black);
        g.drawRect(0,0,getSize().width - 1,getSize
().height - 1);
        g.setColor(Color.red);
        if (spot != null) {
            g.fillOval(spot.x - RADIUS, spot.y -
RADIUS,
            RADIUS * 2, RADIUS * 2);
        }}
    /** dssafd
     * @param event freqfqerf
     */
    public void mousePressed(MouseEvent event) {
        if (spot == null) {
            spot = new Spot(RADIUS);
        }
        spot.x = event.getX();
        spot.y = event.getY();
        repaint();
    }
    /** ergfeqrgf
     * @param event eqfreqfreqf
     */
    public void mouseClicked(MouseEvent event) {}
    /** gfeqrf
     * @param event wrgwrvw
     */
    public void mouseReleased(MouseEvent
event) {}
    /** aergfqevr
     * @param event wfgrwgqvg
     */
    public void mouseEntered(MouseEvent event)
{}
    /** veqv
     * @param event dfvwvar
     */
    public void mouseExited(MouseEvent event) {}
}/** sdfgsg
 */
public class Spot {
    /** gfdsfg
     */
    public int size;
    
    /** fgadfga
     */
    public int x;
    
    /** dsfgdsfg
     */
    public int y;
    
    /** sfgdsafg
     * @param intSize dsvagf
     */
    public Spot(int intSize) {
        size = intSize;
        x = -1;
        y = -1;
    }}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN">

<HTML>
  <HEAD>
    <TITLE></TITLE>
  </HEAD>
  <BODY>
  <applet code="ClickMe.class" width=300
height=150>
</applet>
  </BODY>
</HTML>



---------- END SOURCE ----------

CUSTOMER WORKAROUND :
There are other ways to view objects
Comment 1 qpolarbear 2005-12-14 19:05:58 UTC
*** Issue 28620 has been marked as a duplicate of this issue. ***
Comment 2 David Strupl 2010-09-23 09:14:02 UTC
I am closing all reports in category Java/Unsupported as wontfix. These should
be dead issues --- if the reported cases are against some live part of the
NetBeans IDE please reopen and we can discuss to which category they belong.