commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1032422 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav: WebdavFileObject.java WebdavMethodRetryHandler.java
Date Sun, 07 Nov 2010 23:46:27 GMT
Author: sebb
Date: Sun Nov  7 23:46:27 2010
New Revision: 1032422

URL: http://svn.apache.org/viewvc?rev=1032422&view=rev
Log:
Replace HttpClient deprecated methods with updated ones

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=1032422&r1=1032421&r2=1032422&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
Sun Nov  7 23:46:27 2010
@@ -22,6 +22,7 @@ import org.apache.commons.httpclient.Htt
 import org.apache.commons.httpclient.URIException;
 import org.apache.commons.httpclient.methods.RequestEntity;
 import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
+import org.apache.commons.httpclient.params.HttpMethodParams;
 import org.apache.commons.httpclient.util.DateUtil;
 import org.apache.commons.vfs.provider.URLFileName;
 import org.apache.commons.vfs.provider.DefaultFileContent;
@@ -99,7 +100,7 @@ public class WebdavFileObject extends Ht
 
     protected void configureMethod(HttpMethodBase httpMethod)
     {
-        httpMethod.setMethodRetryHandler(WebdavMethodRetryHandler.getInstance());
+        httpMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, WebdavMethodRetryHandler.getInstance());
     }
 
     /**

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java?rev=1032422&r1=1032421&r2=1032422&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java
Sun Nov  7 23:46:27 2010
@@ -16,10 +16,10 @@
  */
 package org.apache.commons.vfs.provider.webdav;
 
-import org.apache.commons.httpclient.MethodRetryHandler;
+import java.io.IOException;
+
+import org.apache.commons.httpclient.HttpMethodRetryHandler;
 import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpConnection;
-import org.apache.commons.httpclient.HttpRecoverableException;
 
 
 /**
@@ -29,7 +29,7 @@ import org.apache.commons.httpclient.Htt
  * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  * @version $Revision$ $Date$
  */
-public final class WebdavMethodRetryHandler implements MethodRetryHandler
+public final class WebdavMethodRetryHandler implements HttpMethodRetryHandler
 {
     private static final WebdavMethodRetryHandler INSTANCE = new WebdavMethodRetryHandler();
 
@@ -42,10 +42,8 @@ public final class WebdavMethodRetryHand
         return INSTANCE;
     }
 
-    public boolean retryMethod(HttpMethod method, HttpConnection connection,
-                               HttpRecoverableException recoverableException, int executionCount,
-                               boolean requestSent)
-    {
+    public boolean retryMethod(HttpMethod method, IOException exception,
+            int executionCount) {
         return executionCount < 2;
     }
 }



Mime
View raw message