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

New instance of SftpFileSystem is created every time due to the bug in FileSystemOptions.compareTo()

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None

    Description

      FileSystemOptions.compareTo() uses TreeMap's hashcode. This is not appropriate if map contains array instances since Array's equals() merely checks == (so that new Array[0].equals(new Array[0]) is false).

      So when I configure FileSystemOptions like {{SftpFileSystemConfigBuilder.getInstance().setIdentities(options, new File[]

      {new File(privateKeyFile)}

      )}} I never get filesystem instance reused.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            joehni Joerg Schaible
            ksafonov Kirill Safonov
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment