You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/11/05 22:35:06 UTC

svn commit: r1198070 - /maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java

Author: olamy
Date: Sat Nov  5 21:35:06 2011
New Revision: 1198070

URL: http://svn.apache.org/viewvc?rev=1198070&view=rev
Log:
[MINDEXER-45] WagonFetcher.disconnect should throw IOException
Submitted by Jesse Glick.

Modified:
    maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java

Modified: maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java
URL: http://svn.apache.org/viewvc/maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java?rev=1198070&r1=1198069&r2=1198070&view=diff
==============================================================================
--- maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java (original)
+++ maven/indexer/trunk/indexer-core/src/main/java/org/apache/maven/index/updater/WagonHelper.java Sat Nov  5 21:35:06 2011
@@ -63,12 +63,12 @@ public class WagonHelper
     }
 
     /**
-     * @deprecated use getWagonResourceFetcher with protocol argument
      * @param listener
      * @param authenticationInfo
      * @param proxyInfo
      * @return
      * @throws ComponentLookupException
+     * @deprecated use getWagonResourceFetcher with protocol argument
      */
     public WagonFetcher getWagonResourceFetcher( final TransferListener listener,
                                                  final AuthenticationInfo authenticationInfo,
@@ -84,7 +84,7 @@ public class WagonHelper
      * @param listener
      * @param authenticationInfo
      * @param proxyInfo
-     * @param protocol protocol supported by wagon http/https
+     * @param protocol           protocol supported by wagon http/https
      * @return
      * @throws ComponentLookupException
      * @since 4.1.3
@@ -177,6 +177,7 @@ public class WagonHelper
         }
 
         public void disconnect()
+            throws IOException
         {
             if ( wagon != null )
             {
@@ -186,7 +187,9 @@ public class WagonHelper
                 }
                 catch ( ConnectionException ex )
                 {
-                    logError( "Failed to close connection", ex );
+                    IOException ioe = new IOException( ex.toString() );
+                    ioe.initCause( ex );
+                    throw ioe;
                 }
             }
         }