maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r662323 - /maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
Date Mon, 02 Jun 2008 05:08:24 GMT
Author: brett
Date: Sun Jun  1 22:08:24 2008
New Revision: 662323

URL: http://svn.apache.org/viewvc?rev=662323&view=rev
Log:
add missing file handle closing

Modified:
    maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java

Modified: maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java?rev=662323&r1=662322&r2=662323&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
(original)
+++ maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
Sun Jun  1 22:08:24 2008
@@ -733,9 +733,10 @@
         transferEvent.setTimestamp( System.currentTimeMillis() );
         transferEvent.setLocalFile( source );
 
+        InputStream input = null;
         try
         {
-            InputStream input = new FileInputStream( source );
+            input = new FileInputStream( source );
 
             while ( true )
             {
@@ -755,6 +756,10 @@
             
             throw new TransferFailedException( "Failed to post-process the source file",
e );
         }
+        finally
+        {
+            IOUtil.close( input );
+        }
     }
 
     public void putDirectory( File sourceDirectory, String destinationDirectory )



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message