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.
Hy, NbBuildPopupMenuAction uses the List returned from PopupMenuActionsProvider.getPopupMenuItems() to add some more data if the list is empty. The error is that PopupMenuActionsProvider.getPopupMenuItems() might also return Collections.emptyList(), which doesn't allow add() so we get an Exception. Attaching a patch which fixes this.
Created attachment 74135 [details] Patch which creates a new Array when an empty list is returned to avoid adding to Collections.emptyList()
Bug prior to 7.0, not touched for the last 2 years --> P4.
I don't think that returning unmodifiable list is any problem. Closing as wontfix.
Nor was returning an unmodifiable list the problem. The problem is calling List.add on an unmodifiable list. To prevent that I instantiate a new ArrayList.
If you want I can review this again (it's quite old but seems ok) and commit it myself on jet-main.
I guess the code was not touched and the fastest solution will be to just fix it. Thanks anyway. http://hg.netbeans.org/jet-main/rev/22825c490d22
Integrated into 'main-golden', will be available in build *201210300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/22825c490d22 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #153859 - NbBuildPopupMenuAction throws exception if no PopupMenuActionsProvider present.