You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/11/08 00:46:27 UTC
svn commit: r1032422 - in
/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav:
WebdavFileObject.java WebdavMethodRetryHandler.java
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;
}
}