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.
Build: NetBeans IDE Dev (Build 201206080001) VM: Java HotSpot(TM) Client VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20 OS: Windows 7 User Comments: javydreamercsw: Opening a Maven project Stacktrace: java.lang.NullPointerException at org.netbeans.api.autoupdate.OperationContainer.add(OperationContainer.java:304) at org.netbeans.api.autoupdate.OperationContainer.add(OperationContainer.java:268) at org.netbeans.modules.ide.ergonomics.fod.FindComponentModules.getAllForEnable(FindComponentModules.java:258) at org.netbeans.modules.ide.ergonomics.fod.FindComponentModules.findComponentModules(FindComponentModules.java:193) at org.netbeans.modules.ide.ergonomics.fod.FindComponentModules.access$000(FindComponentModules.java:71) at org.netbeans.modules.ide.ergonomics.fod.FindComponentModules$1.run(FindComponentModules.java:179)
Created attachment 120573 [details] stacktrace
Invalid calling AU API org.netbeans.api.autoupdate.OperationContainer.add(OperationContainer.java:304) with null parameter.
Well, the null comes from AU, I think. This is the ergonomics code: OperationContainer.OperationInfo<OperationSupport> inf = ocForEnable.add (el); Set<UpdateElement> reqs = inf.getRequiredElements (); ocForEnable.add (reqs); The null must be in reqs set. I bet getRequiredElements should not return set which contains null, right?
Cannot call http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/org/netbeans/api/autoupdate/OperationContainer.html#add(org.netbeans.api.autoupdate.UpdateElement) with <null> argument.
The javadoc of inf.getRequiredElements() does not mention it can return null. Either the Javadoc needs to say that, or the inf.getRequiredElements () needs to be fixed not to return null (or an element of null in the array). As far as I can say FoD is doing nothing wrong.
inf.getRequiredElements() should not return a collection with 'null' elements - I will fix it
http://hg.netbeans.org/core-main/rev/303eb8c29a11
Integrated into 'main-golden', will be available in build *201212170919* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/303eb8c29a11 User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #213848: NPE at org.netbeans.api.autoupdate.OperationContainer.add