commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r373345 - /jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
Date Sun, 29 Jan 2006 20:12:25 GMT
Author: dfs
Date: Sun Jan 29 12:12:22 2006
New Revision: 373345

URL: http://svn.apache.org/viewcvs?rev=373345&view=rev
Log:
Simplified try/catch/rethrow to try/finally in _openDataConnection_

Modified:
    jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java

Modified: jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java?rev=373345&r1=373344&r2=373345&view=diff
==============================================================================
--- jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java Sun
Jan 29 12:12:22 2006
@@ -500,12 +500,10 @@
             if (__dataTimeout >= 0)
                 server.setSoTimeout(__dataTimeout);
             try {
-				socket = server.accept();
-			} catch (IOException ioe) {
-				server.close();
-				throw ioe;
-			}
-            server.close();
+                socket = server.accept();
+            } finally {
+                server.close();
+            }
         }
         else
         { // We must be in PASSIVE_LOCAL_DATA_CONNECTION_MODE



---------------------------------------------------------------------
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