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.
I've experienced a few times that I called a wrong openide method in different places of my code that created deadlocks or other hard to trace problems. (some worked for some time but failed in the long run) The reason was that I used the methods on wrong places. (since I didn't know/care about what is exactly done inside) Examples: use for FileObject.refresh()/findResource() within the AbstractFileSystem.info/change/children interface.. time consuming dataobject/fileobject methods within a propertychangelistener that were creating cycles and potentially deadlocks. It would be nice if time/performance critical methods were given a javadoc description with a warning (and maybe possible solution). Or a preffered thread for a method's call..
You've read the Threading Document in the APIs, right? There is surely more to say. Unfortunately I don't know what the answers are.
Didn't get a response here, will assume you read it and it makes (some) sense. This document lists generally which thread or threading scheme should be used for entire APIs, rather than individual methods (with just a couple of exceptions). I would say *any* filesystems method should be considered performance-critical unless there is some reason to think otherwise, and the doc says so. Could you elaborate your sentence about PCL's and refresh and AFS interfaces and DataSystems methods? I don't really follow what you are saying there.
yes, I've read it.. It's a nice start. However I haven't seen the threading info in the javadoc itself.. It's te Threadng document is nice reading but for everyday use it's not of much use: Example: DataObject.getChildren() is considered bad under some circumstance in the Threading document, however the javadoc states just: "Get the children of this folder.". And the Javadoc is the place to go with everyday use, I don't check all the different documents on the openide site when programming. Another example that might be more explanatory: Just lately I've been told that SharedClassObject.findObject() when searching for Global settings can be quite time consuming.. I don't know, so I'm happily calling the method to find out a global setting's value in the FileSystem.Change.outputStream() method. What I would like to see is a small comment in the javadoc. "Do not use in the performance extensive code segments".
The example with DataFolder is good one, but for oposite reasons. As far as I know the DataFolder.getChildren () is safe for everyone except for those who provide underlaying layers: lookup & filesystems There is much more people writing something safe than those who write lookup&fss... So should the JavaDoc scare those people and be accurate or people should remember that is is dangerous to call from lower layer to upper layer of the system (layers are: lookup, filesystem, datasystem, nodes...)?
*** Issue 20276 has been marked as a duplicate of this issue. ***
I guess obsolete now. If anyone knows what is or is not legal, document it.