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.

Bug 162415

Summary: java.util.ConcurrentModificationException at org.openide.util.WeakSet$WeakSetIterator.checkModcount
Product: projects Reporter: martinhavle <martinhavle>
Component: Generic Projects UIAssignee: Andrey Yamkovoy <kaktus>
Status: RESOLVED FIXED    
Severity: blocker Keywords: RANDOM, THREAD
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=149306
Issue Type: DEFECT Exception Reporter: 149306
Attachments: stacktrace
Proposed fix

Description martinhavle 2009-04-10 16:11:13 UTC
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)
Comment 1 martinhavle 2009-04-10 16:11:27 UTC
Created attachment 79904 [details]
stacktrace
Comment 2 Andrey Yamkovoy 2009-04-13 06:46:37 UTC
Actually this issue not reproducible for me but anyway the static set should be synchronized.
Comment 3 Andrey Yamkovoy 2009-04-13 07:19:39 UTC
Created attachment 79959 [details]
Proposed fix
Comment 4 Jesse Glick 2009-04-14 15:09:21 UTC
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.)
Comment 5 Andrey Yamkovoy 2009-04-15 06:52:26 UTC
I will remove Collections.synchronizedSet from the patch.
Comment 6 Andrey Yamkovoy 2009-04-15 07:43:27 UTC
Fixed in the core-main
Comment 7 Quality Engineering 2009-04-15 19:31:30 UTC
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