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

RamFileRandomAccessContent.close() does *NOT* call RamFileObject.close().

    XMLWordPrintableJSON

Details

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

    Description

      The problem manifests itself if one uses RandomAccessContent from a FileObject which is from ram://. Closing any stream from the RAC does not cleanup some counters which means future calls to FileObject.isContentOpen() return true which is wrong because the RAC.close().

      The fix to RamFileRandomAccessContent.close() is a simple one liner.

      /*

      • (non-Javadoc)
      • @see org.apache.commons.vfs.RandomAccessContent#close()
        */
        @Override
        public void close() throws IOException { // do not try and call rafis.close() which does nothing but call this method. this.file.close(); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            mp1 Miroslav Pokorny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: