commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r548639 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
Date Tue, 19 Jun 2007 07:58:52 GMT
Author: imario
Date: Tue Jun 19 00:58:51 2007
New Revision: 548639

URL: http://svn.apache.org/viewvc?view=rev&rev=548639
Log:
VFS-98: synchronized against filesystem to avoid lock

Modified:
    jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java

Modified: jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java?view=diff&rev=548639&r1=548638&r2=548639
==============================================================================
--- jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
(original)
+++ jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
Tue Jun 19 00:58:51 2007
@@ -47,7 +47,6 @@
 
     // An idle client
     private FtpClient idleClient;
-    private final Object idleClientSync = new Object();
 
     protected FtpFileSystem(final GenericFileName rootName, final FtpClient ftpClient, final
FileSystemOptions fileSystemOptions)
     {
@@ -101,12 +100,12 @@
      */
     public FtpClient getClient() throws FileSystemException
     {
-        synchronized (idleClientSync)
+        synchronized (this)
             {
                 if (idleClient == null || !idleClient.isConnected())
                 {
 					idleClient = null;
-					
+
 					FtpClient ftpClient = new FTPClientWrapper((GenericFileName) getRoot().getName(), getFileSystemOptions());
                     return ftpClient;
                     /*
@@ -134,7 +133,7 @@
      */
     public void putClient(final FtpClient client)
     {
-        synchronized (idleClientSync)
+        synchronized (this)
             {
                 if (idleClient == null)
                 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message