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.
ObjectScene.getSelectedObjects should return UnModifiableSet. While doing a for each through the selected objects, it seems that the selected objects where modified (since I deleting the selected objects one by one). Exception thrown was this. Any list like this should be a copy of the actual list. java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$KeyIterator.next(HashMap.java:827) at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010) at org.netbeans.modules.web.jsf.navigation.graph.actions.MapActionUtility$1.actionPerformed(MapActionUtility.java:155) The workaround would be to make my own copy. David, do you think this is an issue?
I think the implementation is ok because performance reason. During "setSelectedObjects" method call you would have to create a copy of the set - current algorithm creates a copy of the set only for purpose of firing SELECTION_CHANGED events to ObjectSceneListener. The best would be to use CopyOnWriteHashSet (but it does not exist). I would rather recomend you to create a copy of the set while you modifying the ObjectScene structures. I am closing the issue as WONTFIX. Feel free to reopen it if you disagree.
Reopening the issue. This behaviour has to be documented in documentation.html and javadoc for all getter methods.
Created attachment 51797 [details] image of drop down behind new watch dialog
oops added to wrong bug. ignore that last attachment