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 200904100201) VM: Java HotSpot(TM) Client VM, 14.0-b12, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b03 OS: SunOS, 5.11, x86 User Comments: martinhavle: Just started IDE. Stacktrace: java.util.ConcurrentModificationException at org.openide.util.WeakSet$WeakSetIterator.checkModcount(WeakSet.java:481) at org.openide.util.WeakSet$WeakSetIterator.hasNext(WeakSet.java:432) at org.netbeans.modules.project.ui.ProjectsRootNode.checkNoLazyNode(ProjectsRootNode.java:205) at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:318) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Created attachment 79904 [details] stacktrace
Actually this issue not reproducible for me but anyway the static set should be synchronized.
Created attachment 79959 [details] Proposed fix
If you always access it using 'synchronized (all)' then using Collections.synchronizedSet is superfluous. (Generally I find Collections.synchronized* not very useful because you so often want to do more than one operation at a time to the collection.)
I will remove Collections.synchronizedSet from the patch.
Fixed in the core-main
Integrated into 'main-golden', will be available in build *200904151401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2b1d0560aa74 User: Andrey Yamkovoy <kaktus@netbeans.org> Log: Fix for issue #162415 - java.util.ConcurrentModificationException at org.openide.util.WeakSet$WeakSetIterator.checkModcount