Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-351

DefaultSftpClient.read() Returns InputStream which violates Closeable Interface contract

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 0.12.0
    • None
    • None

    Description

      If you call DefaultSftpClient.read(path), it returns an InputStream. If you inadvertantly, call close() twice on the input stream, on the second call, it throws an IOException - "SFTP error(2) No Such File".

      This violates the Closeable interface which says if the resource is already closed(), the call is ignored.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gsexton George Sexton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: