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 41074

Summary: Threading of queries is strange
Product: projects Reporter: Jaroslav Tulach <jtulach>
Component: Generic InfrastructureAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker Keywords: THREAD
Priority: P2    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 40703    

Description Jaroslav Tulach 2004-03-17 15:21:52 UTC
The SharabilityQuery and FileBuiltQuery reside in
the same package, but seem to have completely
different threading policies as the
SharabilityQuery can be called from private locks
in filesystem during for example createFolder
operation. This requre the implementators to be
very careful.

On the other hand the FileBuiltQuery is not going
to be called from such obscure places and that is
why it does not need so much attention from
implementators.

It is not wise to have them both in the same
package even, if correctly documented, it might
not form big problem. Still it might be better to
move the Sharability to org.openide.filesystems as
it seems to share the same threading
characteristics as MimeResolver for example.
Comment 1 Jesse Glick 2004-03-18 10:06:41 UTC
Will definitely consider moving SQ to org.openide.filesystems.
Comment 2 Jesse Glick 2004-06-17 00:23:27 UTC
I have added Javadoc to CQI, SQI, and VQI explaining that implementors
should be written defensively and not acquire locks, referring to the
Filesystems API.
Comment 3 Jesse Glick 2004-06-17 05:11:19 UTC
Committed.