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.
The default implementation of DataObject.getLookup() acquires Children.MUTEX, which is deadlock-prone (as documented in the method's Javadoc). All DataObject's in netbeans.org modules should implement this method in a safer way, usually by simply returning getCookieSet().getLookup(). However, this approach does not work for DO's returning extra cookies by overriding DO.getCookie(). Such DO's can be fixed to create the extra cookies through CookieSet.Factory.
Created attachment 70039 [details] Fixes to all DO's except those in the xml cluster
Some DO's required changes to the cookie registration. I would like to ask for reviews of the changes to these DO's. They are: form: PaletteItemDataObject java.source: ClassDataObject properties: PropertiesDataObject web.core: JspServletDataObject
The changes in PaletteItemDataObject seem to be correct and harmless. Feel free to apply them.
Created attachment 70054 [details] Fixes to all DO's including those in the xml cluster
I would also like to ask for reviews for changes to the following DO's in the loaders-complete.diff attachment: bpel.core: BPELDataObject xml.schema: SchemaDataObject xml.wsdlui: WSDLDataObject xsl: XSLDataObject xslt.core: XSLTDataObject, XSLDataObject xlst.tmap: TMapDataObject
I intend to commit loaders-complete.diff on Friday September 19.
xml.schema change looks good to me.
main#7004098454c7 I will also look at the DO's in contrib next week, so leaving open. But I think the fix of issue 146072 doesn't need to wait for that.
Integrated into 'main-golden', will be available in build *200809191401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7004098454c7 User: Andrei Badea <abadea@netbeans.org> Log: #147492: Override DataObject.getLookup()
Fixed most *DataObject.java in main/contrib in contrib#2ec16a844efe. Skipped the following: clazz/src/org/netbeans/modules/clazz/ClassDataObject.java clazz/src/org/netbeans/modules/clazz/CompiledDataObject.java clazz/src/org/netbeans/modules/clazz/SerDataObject.java (The whole module looks broken.) corba/src/org/netbeans/modules/corba/IDLDataObject.java corba/src/org/netbeans/modules/corba/ioranalyzer/IORDataObject.java (The whole module looks broken.) docbook/src/org/netbeans/modules/docbook/DocBookDataObject.java docbook/src/org/netbeans/modules/docbook/resources/solbook/SolBookDataObject.java (Instances are added to the lookup of the node delegate, so the default DO.getLookup() does the right thing -- except for acquiring Children.MUTEX. Probably need to add those instances to the DO's CookieSet using CookieSet.assign(). Filed issue 147890.) other/povray/povray/src/org/netbeans/modules/povray/PovRayDataObject.java (Adds cookie to the node delegate. Also, the modules looks outdated and unmaintained.) prefsettings/src/org/netbeans/modules/prefsettings/PrefsDataObject.java (Was afraid to touch this because of the complex logic of getNodeDelegate(). The module is not in cluster.experimental, so probably not used anymore?) tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/TaskListDataObject.java (Overrides DO.getCookie() for a weird purpose. Filed issue 147893.)
Marking as fixed.