You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-commits@maven.apache.org by mi...@apache.org on 2004/06/25 19:20:13 UTC
cvs commit: maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon AbstractWagon.java
michal 2004/06/25 10:20:13
Modified: wagon-api/src/main/java/org/apache/maven/wagon
AbstractWagon.java
Log:
stream are now closed in finally block
Revision Changes Path
1.6 +16 -11 maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
Index: AbstractWagon.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractWagon.java 3 Jun 2004 18:27:00 -0000 1.5
+++ AbstractWagon.java 25 Jun 2004 17:20:13 -0000 1.6
@@ -105,10 +105,6 @@
{
transfer( resource, input, output, TransferEvent.REQUEST_GET );
- shutdownStream( input );
-
- shutdownStream( output );
-
}
catch ( IOException e )
{
@@ -129,6 +125,13 @@
throw new TransferFailedException( msg, e );
}
+ finally
+ {
+ shutdownStream( input );
+
+ shutdownStream( output );
+
+ }
fireGetCompleted( resource, destination );
}
@@ -142,12 +145,6 @@
{
transfer( resource, input, output, TransferEvent.REQUEST_PUT );
- shutdownStream( input );
-
- if ( closeOutput )
- {
- shutdownStream( output );
- }
}
catch ( IOException e )
{
@@ -157,7 +154,15 @@
throw new TransferFailedException( msg, e );
}
+ finally
+ {
+ shutdownStream( input );
+ if ( closeOutput )
+ {
+ shutdownStream( output );
+ }
+ }
firePutCompleted( resource, source );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-cvs-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-cvs-help@maven.apache.org