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

AbstractFileObject: wrong synchronization of content-related code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0
    • None
    • None

    Description

      Creating content through AbstractFileObject#getContent() and DefaultFileContent itself seem to be synchronized, but closing the content by AbstractFileObject#close() and checking whether it is open, by AbstractFileObject#isContentOpen() are NOT synchronized.
      Both these methods miss some lock-object. For close() it may result in severe race condition in case of FileObject shared across more than one thread.

      BTW, thead-safeness of important VFS classes/interfaces like FileObject is not documented in javadoc.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mzawirski Marek Zawirski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: