commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
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 GMT
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<? extends FileSystem> fileSystemClass, final String
name, final Object value)
@@ -171,13 +177,13 @@ public final class FileSystemOptions imp
         }
 
         // ensure proper sequence of options
-        final SortedMap<FileSystemOptionKey, Object> myOptions = 
-              options instanceof SortedMap 
-            ? (SortedMap<FileSystemOptionKey, Object>)options 
+        final SortedMap<FileSystemOptionKey, Object> myOptions =
+              options instanceof SortedMap
+            ? (SortedMap<FileSystemOptionKey, Object>)options
             : new TreeMap<FileSystemOptionKey, Object>(options);
-        final SortedMap<FileSystemOptionKey, Object> theirOptions = 
-              other.options instanceof SortedMap 
-            ? (SortedMap<FileSystemOptionKey, Object>)other.options 
+        final SortedMap<FileSystemOptionKey, Object> theirOptions =
+              other.options instanceof SortedMap
+            ? (SortedMap<FileSystemOptionKey, Object>)other.options
             : new TreeMap<FileSystemOptionKey, Object>(other.options);
         final Iterator<FileSystemOptionKey> optKeysIter = myOptions.keySet().iterator();
         final Iterator<FileSystemOptionKey> 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<FileSystemOptionKey, Object> myOptions = 
-                options instanceof SortedMap 
-              ? (SortedMap<FileSystemOptionKey, Object>)options 
+            final SortedMap<FileSystemOptionKey, Object> myOptions =
+                options instanceof SortedMap
+              ? (SortedMap<FileSystemOptionKey, Object>)options
               : new TreeMap<FileSystemOptionKey, Object>(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}



Mime
View raw message