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()

    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

            People

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

              Dates

                Created:
                Updated:
                Resolved: