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 32544 - NPE in RootFolderNode.getCustomizer while using Bean Browser
Summary: NPE in RootFolderNode.getCustomizer while using Bean Browser
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
: 31947 (view as bug list)
Depends on:
Reported: 2003-04-02 02:45 UTC by cnovak
Modified: 2008-12-22 15:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

ide.log file (137.09 KB, text/plain)
2003-04-02 02:46 UTC, cnovak

Note You need to log in before you can comment on or make changes to this bug.
Description cnovak 2003-04-02 02:45:22 UTC
I got a NullPointerException while browsing a local file 
system mount on my machine w/Bean Browser:

1. Right Mouse click on a mounted local file system, and 
choose Tools -> Bean Browse Node

2. Expand the properties node.

3. NullPointerException occurs:

*********** Exception occurred ************ at Tue Apr 01 
18:30:18 PST 2003
[catch] at org.netbeans.core.RootFolderNode.getCustomizer
	at org.openide.nodes.FilterNode.getCustomizer
	at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
	at java.lang.reflect.Method.invoke(
ePropertyNode(Unknown Source)
ateNodes(Unknown Source)
	at org.openide.nodes.Children$Keys$KE.nodes
	at org.openide.nodes.ChildrenArray.nodesFor
	at org.openide.nodes.Children$Info.nodes
	at org.openide.nodes.Children.justComputeNodes
	at org.openide.nodes.ChildrenArray.nodes
	at org.openide.nodes.Children.computeNodes
	at org.openide.nodes.Children.getNodes
	at org.openide.nodes.Children.findChild
	at org.openide.nodes.Children.getNodes

I attached my ide.log to this bug.
Comment 1 cnovak 2003-04-02 02:46:13 UTC
Created attachment 9640 [details]
ide.log file
Comment 2 Jesse Glick 2003-04-02 23:38:38 UTC
The problem is that the Node.getCustomizer method is being treated as
a bean method that may be freely called. In fact it may be called only
when hasCustomizer is true, which in this case it presumably was not -
but the Bean Browser does not know that. It just sees a property and
tries to display it. I suppose it could be special-cased to suppress
the property in this case, but it seems pointless.

Note that the Bean Browser does catch exceptions thrown from getters.
Here, RootFolderNode is catching its own NPE, reporting it, and
returning null.
Comment 3 Jesse Glick 2003-04-03 01:52:17 UTC
Fixed for 4.0:

committed     Up-To-Date  1.51       
Comment 4 Petr Nejedly 2004-01-13 15:15:04 UTC
*** Issue 31947 has been marked as a duplicate of this issue. ***
Comment 5 Marian Mirilovic 2005-07-13 13:22:47 UTC