[ 
https://issues.apache.org/jira/browse/VFS-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daryl Odnert updated VFS-684:
-----------------------------
    Description: The API documentation for VFS is missing advisory information 
about the safety (or danger) of sharing class instances across multiple 
threads. Refer to bugs VFS-253 and VFS-683 for examples of what can happen when 
the same {{FileObject}} instance is accessed in more than one thread. However, 
there is caching that's happening in 
{{org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile}}. [Source 
code is 
here|https://svn.apache.org/viewvc/commons/proper/vfs/tags/commons-vfs2-project-2.2/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java?revision=1811361&view=markup#l303].
 This will definitely result in the same {{FileObject}} being referenced from 
distinct threads if both threads call {{resolveFile}} on the same instance of a 
{{FileSystem}} that extends {{AbstractFileSystem}}. So, it's unclear where 
applications that use VFS are required to apply synchronization and/or whether 
each thread is required to use a distinct {{FileSystem}} instance.  (was: The 
API documentation for VFS is missing advisory information about the safety (or 
danger) of sharing class instances across multiple threads. Refer to bugs 
VFS-253 and VFS-683 for examples of what can happen when the same 
{{FileObject}} instance is accessed in more than one thread.)

> Missing thread-safety information in API documentation
> ------------------------------------------------------
>
>                 Key: VFS-684
>                 URL: https://issues.apache.org/jira/browse/VFS-684
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Daryl Odnert
>            Priority: Major
>              Labels: documentation
>
> The API documentation for VFS is missing advisory information about the 
> safety (or danger) of sharing class instances across multiple threads. Refer 
> to bugs VFS-253 and VFS-683 for examples of what can happen when the same 
> {{FileObject}} instance is accessed in more than one thread. However, there 
> is caching that's happening in 
> {{org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile}}. [Source 
> code is 
> here|https://svn.apache.org/viewvc/commons/proper/vfs/tags/commons-vfs2-project-2.2/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java?revision=1811361&view=markup#l303].
>  This will definitely result in the same {{FileObject}} being referenced from 
> distinct threads if both threads call {{resolveFile}} on the same instance of 
> a {{FileSystem}} that extends {{AbstractFileSystem}}. So, it's unclear where 
> applications that use VFS are required to apply synchronization and/or 
> whether each thread is required to use a distinct {{FileSystem}} instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to