commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joe...@apache.org
Subject svn commit: r805384 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
Date Tue, 18 Aug 2009 12:22:35 GMT
Author: joehni
Date: Tue Aug 18 12:22:35 2009
New Revision: 805384

URL: http://svn.apache.org/viewvc?rev=805384&view=rev
Log:
Make FileSystemOptions cloneable (VFS-278).

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java?rev=805384&r1=805383&r2=805384&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemOptions.java
Tue Aug 18 12:22:35 2009
@@ -29,7 +29,7 @@
  * @see org.apache.commons.vfs.provider.sftp.SftpFileSystemConfigBuilder
  * @see org.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder
  */
-public class FileSystemOptions
+public class FileSystemOptions implements Cloneable
 {
     /** The options */
     private Map options = new TreeMap();
@@ -161,5 +161,14 @@
         // TODO: compare Entry by Entry
         return 0;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object clone() {
+        FileSystemOptions clone = new FileSystemOptions();
+        clone.options = new TreeMap(options);
+        return clone;
+    }
     
 }



Mime
View raw message