Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-684

Missing thread-safety information in API documentation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2
    • None

    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. 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daryl.odnert Daryl Odnert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: