mirror of
https://github.com/owncloud/android-library.git
synced 2026-08-11 16:33:03 +00:00
remove apache httpclient imports
This commit is contained in:
-6
@@ -41,12 +41,6 @@ import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import org.apache.commons.httpclient.ConnectTimeoutException;
|
||||
import org.apache.commons.httpclient.params.HttpConnectionParams;
|
||||
import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
|
||||
|
||||
import com.owncloud.android.lib.common.network.AdvancedSslSocketFactory;
|
||||
|
||||
|
||||
/**
|
||||
* SelfSignedConfidentSslSocketFactory allows to create SSL {@link Socket}s
|
||||
|
||||
@@ -30,8 +30,8 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.GeneralSecurityException;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -42,9 +42,9 @@ import com.owncloud.android.lib.test_project.TestActivity;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.security.GeneralSecurityException;
|
||||
@@ -373,7 +373,7 @@ public class CopyFileTest extends ActivityInstrumentationTestCase2<TestActivity>
|
||||
false
|
||||
);
|
||||
result = copyOperation.execute(mClient);
|
||||
assertTrue(result.getHttpCode() == HttpStatus.SC_CONFLICT);
|
||||
assertTrue(result.getHttpCode() == HttpConstants.HTTP_CONFLICT);
|
||||
|
||||
// target location (renaming) has invalid characters
|
||||
copyOperation = new CopyRemoteFileOperation(
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ import java.security.GeneralSecurityException;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
+7
-7
@@ -29,9 +29,9 @@ import java.security.GeneralSecurityException;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -184,11 +184,11 @@ public class GetShareesTest extends RemoteTest {
|
||||
// search for sharees including wrong page values
|
||||
getShareesOperation = new GetRemoteShareesOperation("a", 0, 50);
|
||||
result = getShareesOperation.execute(mClient);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpStatus.SC_BAD_REQUEST);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpConstants.HTTP_BAD_REQUEST);
|
||||
|
||||
getShareesOperation = new GetRemoteShareesOperation("a", 1, 0);
|
||||
result = getShareesOperation.execute(mClient);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpStatus.SC_BAD_REQUEST);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpConstants.HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,11 +237,11 @@ public class GetShareesTest extends RemoteTest {
|
||||
// search for sharees including wrong page values
|
||||
getShareesOperation = new GetRemoteShareesOperation("@", 0, 50);
|
||||
result = getShareesOperation.execute(mClient);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpStatus.SC_BAD_REQUEST);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpConstants.HTTP_BAD_REQUEST);
|
||||
|
||||
getShareesOperation = new GetRemoteShareesOperation("@", 1, 0);
|
||||
result = getShareesOperation.execute(mClient);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpStatus.SC_BAD_REQUEST);
|
||||
assertTrue(!result.isSuccess() && result.getHttpCode() == HttpConstants.HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserAvatarOperation.ResultData;
|
||||
import com.owncloud.android.lib.test_project.TestActivity;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
|
||||
|
||||
/**
|
||||
* Class to test {@link GetRemoteUserAvatarOperation}
|
||||
@@ -81,7 +81,7 @@ public class GetUserAvatarTest extends RemoteTest {
|
||||
// request again, with the just received etag
|
||||
result = mActivity.getUserAvatar(AVATAR_DIMENSION, etag);
|
||||
assertFalse(result.isSuccess());
|
||||
assertTrue(result.getHttpCode() == HttpStatus.SC_NOT_MODIFIED);
|
||||
assertTrue(result.getHttpCode() == HttpConstants.HTTP_NOT_MODIFIED);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ import java.security.GeneralSecurityException;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.OwnCloudClientFactory;
|
||||
@@ -373,7 +373,7 @@ public class MoveFileTest extends RemoteTest {
|
||||
false
|
||||
);
|
||||
result = moveOperation.execute(mClient);
|
||||
assertTrue(result.getHttpCode() == HttpStatus.SC_CONFLICT);
|
||||
assertTrue(result.getHttpCode() == HttpConstants.HTTP_CONFLICT);
|
||||
|
||||
// target location (renaming) has invalid characters
|
||||
moveOperation = new MoveRemoteFileOperation(
|
||||
|
||||
+7
-7
@@ -27,12 +27,12 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.security.GeneralSecurityException;
|
||||
import org.apache.commons.httpclient.ConnectTimeoutException;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.methods.HeadMethod;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.apache.jackrabbit.webdav.DavConstants;
|
||||
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
|
||||
|
||||
@@ -314,7 +314,7 @@ public class OwnCloudClientTest extends AndroidTestCase {
|
||||
DavConstants.DEPTH_0);
|
||||
int status = client.executeMethod(propfind);
|
||||
assertEquals("WebDAV request did not work on WebDAV URI",
|
||||
HttpStatus.SC_MULTI_STATUS, status);
|
||||
HttpConstants.HTTP_MULTI_STATUS, status);
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Exception in PROPFIND method execution", e);
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ package com.owncloud.android.lib.test_project.test;
|
||||
|
||||
import java.security.GeneralSecurityException;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.net.Uri;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ package com.owncloud.android.lib.test_project.test;
|
||||
|
||||
import java.security.GeneralSecurityException;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.net.Uri;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ import java.security.GeneralSecurityException;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ import java.util.Calendar;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
Reference in New Issue
Block a user