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.
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 java.lang.NullPointerException [catch] at org.netbeans.core.RootFolderNode.getCustomizer (RootFolderNode.java:284) at org.openide.nodes.FilterNode.getCustomizer (FilterNode.java:529) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.openide.nodes.PropertySupport$Reflection.getValue (PropertySupport.java:187) at org.netbeans.modules.apisupport.beanbrowser.PropSetKids.mak ePropertyNode(Unknown Source) at org.netbeans.modules.apisupport.beanbrowser.PropSetKids.cre ateNodes(Unknown Source) at org.openide.nodes.Children$Keys$KE.nodes (Children.java:1855) at org.openide.nodes.ChildrenArray.nodesFor (ChildrenArray.java:125) at org.openide.nodes.Children$Info.nodes (Children.java:951) at org.openide.nodes.Children.justComputeNodes (Children.java:457) at org.openide.nodes.ChildrenArray.nodes (ChildrenArray.java:69) at org.openide.nodes.Children.computeNodes (Children.java:372) at org.openide.nodes.Children.getNodes (Children.java:270) at org.openide.nodes.Children.findChild (Children.java:216) at org.openide.nodes.Children.getNodes (Children.java:316) . . . I attached my ide.log to this bug.
Created attachment 9640 [details] ide.log file
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.
Fixed for 4.0: committed Up-To-Date 1.51 core/src/org/netbeans/core/RootFolderNode.java
*** Issue 31947 has been marked as a duplicate of this issue. ***
closed