Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 88072 invoked from network); 2 Feb 2010 18:46:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 18:46:43 -0000 Received: (qmail 81525 invoked by uid 500); 2 Feb 2010 18:46:42 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 81415 invoked by uid 500); 2 Feb 2010 18:46:42 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 81381 invoked by uid 99); 2 Feb 2010 18:46:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 18:46:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 18:46:40 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CFD5C234C1F2 for ; Tue, 2 Feb 2010 10:46:18 -0800 (PST) Message-ID: <76859275.31301265136378850.JavaMail.jira@brutus.apache.org> Date: Tue, 2 Feb 2010 18:46:18 +0000 (UTC) From: "Kirill Safonov (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (VFS-297) New instance of SftpFileSystem is created every time due to the bug in FileSystemOptions.compareTo() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org New instance of SftpFileSystem is created every time due to the bug in FileSystemOptions.compareTo() ---------------------------------------------------------------------------------------------------- Key: VFS-297 URL: https://issues.apache.org/jira/browse/VFS-297 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0 Reporter: Kirill Safonov 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.