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 14926 - NullPointerException in ClassElementImpl
Summary: NullPointerException in ClassElementImpl
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 12618 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-08-29 18:00 UTC by Martin Ryzl
Modified: 2003-06-30 16:43 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 Martin Ryzl 2001-08-29 18:00:43 UTC
Steps to reproduce:
1) create a memory representation of ClassElement
ClassElement.forName(some_class_that_have_inner_classes)
2) use it
new ClassElementNode(element, new ClassChildren(element), false)

the easiest way how to reproduce it is to create an RMI service, add an inner class to the interface,
register it to the RMI Registry and then browse the registry using RMI Registry Browser (Runtime | 
RMI Registry). 


The exception:

Wed Aug 29 18:55:58 GMT+02:00 2001: java.lang.NullPointerException: null
java.lang.NullPointerException
        at org.netbeans.modules.clazz.ClassElementImpl.createInnersMap(ClassElementImpl.java:321)
        at org.netbeans.modules.clazz.ClassElementImpl.getClasses(ClassElementImpl.java:217)
        at org.openide.src.ClassElement.getClasses(ClassElement.java:626)
        at org.openide.src.nodes.ClassChildren.getKeysOfType(ClassChildren.java:233)
        at org.openide.src.nodes.ClassChildren.refreshKeys(ClassChildren.java:204)
        at org.openide.src.nodes.ClassChildren.refreshAllKeys(ClassChildren.java:193)
        at org.openide.src.nodes.ClassChildren.addNotify(ClassChildren.java:147)
        at org.openide.nodes.Children.callAddNotify(Children.java:336)
        at org.openide.nodes.ChildrenArray.create(ChildrenArray.java:51)
        at org.openide.nodes.Children.getArray(Children.java:365)
        at org.openide.nodes.Children.computeNodes(Children.java:355)
        at org.openide.nodes.Children.getNodes(Children.java:284)
        at org.openide.explorer.view.VisualizerNode$1.run(VisualizerNode.java:143)
        at org.openide.util.Mutex.readAccess(Mutex.java:176)
        at org.openide.explorer.view.VisualizerNode.getChildren(VisualizerNode.java:141)
        at org.openide.explorer.view.VisualizerNode.getChildCount(VisualizerNode.java:181)
        at javax.swing.tree.DefaultTreeModel.getChildCount(DefaultTreeModel.java:163)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1412)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1221)
        at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(VariableHeightLayoutCache.java:917)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:162)
        at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1428)
        at javax.swing.plaf.basic.BasicTreeUI$TreeExpansionHandler.treeExpanded(BasicTreeUI.java:2239)
        at javax.swing.JTree.fireTreeExpanded(JTree.java:2114)
        at javax.swing.JTree.setExpandedState(JTree.java:2794)
        at javax.swing.JTree.expandPath(JTree.java:1646)
        at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2022)
        at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2009)
        at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:1963)
        at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2674)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:220)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:220)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:220)
        at java.awt.Component.processMouseEvent(Component.java:3714)
        at java.awt.Component.processEvent(Component.java:3546)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2595)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2499)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
[catch] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2499)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Comment 1 Martin Ryzl 2001-08-29 18:09:25 UTC
sorry it should be Class.forClass() not forName()
Comment 2 Svata Dedic 2001-08-30 16:51:57 UTC
Fixed in dev build.
Comment 3 Tomas Hurka 2001-09-26 15:32:19 UTC
*** Issue 12618 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2001-10-05 13:08:08 UTC
[200110050100] Verified    
Comment 5 Quality Engineering 2003-06-30 16:43:54 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.