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

HttpRandomAccesContent.getDataInputStream() ignores result of skip()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None

    Description

      HttpRandomAccesContent.getDataInputStream() ignores result of skip()

      Findbugs says:

      This method ignores the return value of java.io.InputStream.skip() which can skip multiple bytes. If the return value is not checked, the caller will not be able to correctly handle the case where fewer bytes were skipped than the caller requested. This is a particularly insidious kind of bug, because in many programs, skips from input streams usually do skip the full amount of data requested, causing the program to fail only sporadically. With Buffered streams, however, skip() will only skip data in the buffer, and will routinely fail to skip the requested number of bytes.

      Attachments

        Activity

          People

            rgoers Ralph Goers
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: