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.
java.lang.NullPointerException at org.openide.nodes.Children$Keys.setKeys(Children.java:1712) at org.netbeans.api.looks.LookProperties$Ch.update(LookProperties.java:350) You probably forgot that Look.availableLooks(Look.NodeSubstitute) is allowed to return null. The code at LookProperties.java:350 is: if (active) { // refresh if (l != null && n != null) { setKeys (Collections.EMPTY_LIST); setKeys (l.availableLooks (n.getSubstitute ())); } else { setKeys (Collections.EMPTY_LIST); } } It should be: if (active) { // refresh Look[] available; if (l != null && n != null && (available=l.availableLooks (n.getSubstitute ()) != null ) { setKeys (Collections.EMPTY_LIST); setKeys (available); } else { setKeys (Collections.EMPTY_LIST); } } Please correct this bug here and at possible other places or modify the API doc of Look.availableLooks(..) !
I add a related bug to this issue instead of creating a new issue: DefaultLookNode.drag(Look.NodeSubstitute) claims be behave neutrally be returning null. Unfortunately this is not neutral behaviour but seems to be a bug. DefaultLookNode.drag(..) should better throw an IOException. The reason is that Node.drag() requires either to return a Transferable or to throw an exception. The current implementation results in a NullPointerException whenever a drag is started on a Look derived from DefaultLook not overriding drag(..). Probably similar methods of DefaultLook should also be reviewed ?
Moving Looks issues to dev 4.0
added keyword PROJECTS, because we need to distinguish issues against NB4.0 and S1Sx.y
Neither LookProperties or Look.availableLooks exist any more. Thus marking as fixed.
closed