Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7736186CB for ; Mon, 28 Sep 2015 17:42:14 +0000 (UTC) Received: (qmail 86691 invoked by uid 500); 28 Sep 2015 17:42:05 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 86633 invoked by uid 500); 28 Sep 2015 17:42:05 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 86624 invoked by uid 99); 28 Sep 2015 17:42:05 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2015 17:42:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A91411A1F3E for ; Mon, 28 Sep 2015 17:42:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.001 X-Spam-Level: * X-Spam-Status: No, score=1.001 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2jL_mK8VqSc5 for ; Mon, 28 Sep 2015 17:42:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 81DF620314 for ; Mon, 28 Sep 2015 17:42:02 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A6BC0E0281 for ; Mon, 28 Sep 2015 17:42:01 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 8B9E13A04B9 for ; Mon, 28 Sep 2015 17:42:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1705731 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java Date: Mon, 28 Sep 2015 17:42:01 -0000 To: commits@commons.apache.org From: ecki@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150928174201.8B9E13A04B9@svn01-us-west.apache.org> Author: ecki Date: Mon Sep 28 17:42:01 2015 New Revision: 1705731 URL: http://svn.apache.org/viewvc?rev=1705731&view=rev Log: Provide toString() for options keys and fix trailing blanks Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java?rev=1705731&r1=1705730&r2=1705731&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java Mon Sep 28 17:42:01 2015 @@ -127,6 +127,12 @@ public final class FileSystemOptions imp result = HASH * result + name.hashCode(); return result; } + + @Override + public String toString() + { + return fileSystemClass.getName()+"."+name; + } } void setOption(final Class fileSystemClass, final String name, final Object value) @@ -171,13 +177,13 @@ public final class FileSystemOptions imp } // ensure proper sequence of options - final SortedMap myOptions = - options instanceof SortedMap - ? (SortedMap)options + final SortedMap myOptions = + options instanceof SortedMap + ? (SortedMap)options : new TreeMap(options); - final SortedMap theirOptions = - other.options instanceof SortedMap - ? (SortedMap)other.options + final SortedMap theirOptions = + other.options instanceof SortedMap + ? (SortedMap)other.options : new TreeMap(other.options); final Iterator optKeysIter = myOptions.keySet().iterator(); final Iterator otherKeysIter = theirOptions.keySet().iterator(); @@ -203,7 +209,7 @@ public final class FileSystemOptions imp // TODO: compare Entry by Entry ?? return 0; } - + @Override public int hashCode() { @@ -212,9 +218,9 @@ public final class FileSystemOptions imp if (options == null) { result = prime * result; } else { - final SortedMap myOptions = - options instanceof SortedMap - ? (SortedMap)options + final SortedMap myOptions = + options instanceof SortedMap + ? (SortedMap)options : new TreeMap(options); result = prime * result + myOptions.keySet().hashCode(); result = prime * result + Arrays.deepHashCode(myOptions.values().toArray(new Object[options.size()])); @@ -237,7 +243,7 @@ public final class FileSystemOptions imp FileSystemOptions other = (FileSystemOptions)obj; return compareTo(other) == 0; } - + /** * {@inheritDoc}