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.
MultiDataObject inherits from DataObject; however, MultiDataObject does not override the synchObject() method. This presents a problem as methods such as MultiDataObject.delete are synchronized on synchObject, but MultiDataObject.isDeleteAllowed are synchronized on synchObjectSecondary(). This can cause ConcurrentModificationException to be thrown from the iterators. I am attaching a suggested patch to MultiDataObject
Created attachment 5158 [details] Suggested new MultiDataObject
I tested the MultiDataObject patch and it resolves the concurrent modification exception which was reported.
Chris, it looks like a bug, but unfortunatelly I can't use your patch. I think I need to find some other solution. I guess if I use the patch, it will cause another deadlocks that were fixed by current solution. (the deadlocks #18110, #17941, maybe others) I will try to investigate it more.
The bug is fixed in trunk (with target nb3.4) as revision 1.61. The complete diff is available here: http://www.netbeans.org/source/browse/openide/src/org/openide/loaders/MultiDataObject.java.diff?r1=1.60&r2=1.61&f=H The bugfix passes the loader unit tests.
Created attachment 5241 [details] Patch jar for FFJ 4.0 FCS
Chris, I fixed the bug in netbeans trunk yesterday and it looks good now. I just created the patch jar for FFJ 4.0 FCS build. Please place it in your FFJ installation folder into /lib/patches directory. It contains only MultiDataObject classes and should be placed before openide-compat in the classpath (otherwise please remove MultiDataObject from openide-compat.jar). If patch is correctly installed it should print a message on console: "Running with MultiDataObject patch." I tested it with latest FFJ build, but I need your feedback. Does it solve your problems, please? Let me know, I'd like to integrate it in FFJ as soon as possible, because this bug fix could have an impact on whole IDE. thanks.
I tested this bug and the suggested patch appears to work.
Verified for #020401_01.
Integrated in {pilsen_fcs} branch too. org.openide.loaders.MultiDataObject revision 1.56.14.2.4.1
Resolved for 3.4.x or earlier, no new info since then -> closing.