Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 2a4195c

Browse files
committed
fix lint and compile issues
1 parent d9dce81 commit 2a4195c

File tree

6 files changed

+312
-14
lines changed

6 files changed

+312
-14
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/ConnectionValidator.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ import timber.log.Timber
1515
import java.io.IOException
1616
import java.lang.Exception
1717

18-
class ConnectionValidator (
18+
class ConnectionValidator(
1919
val context: Context,
2020
val clearCookiesOnValidation: Boolean
21-
){
21+
) {
2222

2323
fun validate(baseClient: OwnCloudClient, singleSessionManager: SingleSessionManager): Boolean {
2424
try {
2525
var validationRetryCount = 0
2626
val client = OwnCloudClient(baseClient.baseUri, null, false, singleSessionManager)
2727
if (clearCookiesOnValidation) {
28-
client.clearCookies();
28+
client.clearCookies()
2929
} else {
3030
client.cookiesForBaseUri = baseClient.cookiesForBaseUri
3131
}
@@ -45,7 +45,7 @@ class ConnectionValidator (
4545
}
4646

4747
// Skip the part where we try to check if we can access the parts where we have to be logged in... if we are not logged in
48-
if(baseClient.credentials !is OwnCloudAnonymousCredentials) {
48+
if (baseClient.credentials !is OwnCloudAnonymousCredentials) {
4949
client.setFollowRedirects(false)
5050
val contentReply = canAccessRootFolder(client)
5151
if (contentReply.httpCode == HttpConstants.HTTP_OK) {
@@ -184,4 +184,4 @@ class ConnectionValidator (
184184
companion object {
185185
val VALIDATION_RETRY_COUNT = 3
186186
}
187-
}
187+
}

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/HttpClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import android.content.Context;
2828

29-
import com.facebook.stetho.okhttp3.StethoInterceptor;
3029
import com.owncloud.android.lib.common.network.AdvancedX509TrustManager;
3130
import com.owncloud.android.lib.common.network.NetworkUtils;
3231
import okhttp3.Cookie;

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods/webdav/PropfindMethod.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class PropfindMethod(
5050
public override fun onExecute(): Int {
5151
davResource.propfind(
5252
depth = depth,
53-
reqProp = *propertiesToRequest,
53+
reqProp = propertiesToRequest,
5454
listOfHeaders = super.getRequestHeadersAsHashMap(),
5555
callback = { response: Response, hrefRelation: HrefRelation? ->
5656
when (hrefRelation) {

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/GetBaseUrlRemoteOperation.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import com.owncloud.android.lib.common.OwnCloudClient
2727
import com.owncloud.android.lib.common.http.HttpConstants
2828
import com.owncloud.android.lib.common.http.methods.webdav.DavUtils
2929
import com.owncloud.android.lib.common.http.methods.webdav.PropfindMethod
30-
import com.owncloud.android.lib.common.network.WebdavUtils
3130
import com.owncloud.android.lib.common.operations.RemoteOperation
3231
import com.owncloud.android.lib.common.operations.RemoteOperationResult
3332
import timber.log.Timber
@@ -58,7 +57,7 @@ class GetBaseUrlRemoteOperation : RemoteOperation<String?>() {
5857
else RemoteOperationResult<String?>(propFindMethod).apply { data = null }
5958
} catch (e: Exception) {
6059
Timber.e(e, "Could not get actuall (or redirected) base URL from base url (/).")
61-
RemoteOperationResult<String?>(e);
60+
RemoteOperationResult<String?>(e)
6261
}
6362
}
6463

@@ -70,4 +69,4 @@ class GetBaseUrlRemoteOperation : RemoteOperation<String?>() {
7069
*/
7170
private const val TIMEOUT = 10000
7271
}
73-
}
72+
}

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/GetRemoteStatusOperation.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult
3030
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode
3131
import com.owncloud.android.lib.resources.status.HttpScheme.HTTPS_PREFIX
3232
import com.owncloud.android.lib.resources.status.HttpScheme.HTTP_PREFIX
33-
import com.owncloud.android.lib.resources.status.HttpScheme.HTTP_SCHEME
3433
import org.json.JSONException
35-
import timber.log.Timber
3634

3735
/**
3836
* Checks if the server is valid
@@ -45,13 +43,13 @@ import timber.log.Timber
4543
class GetRemoteStatusOperation : RemoteOperation<RemoteServerInfo>() {
4644

4745
public override fun run(client: OwnCloudClient): RemoteOperationResult<RemoteServerInfo> {
48-
if(!usesHttpOrHttps(client.baseUri)) {
46+
if (!usesHttpOrHttps(client.baseUri)) {
4947
client.baseUri = buildFullHttpsUrl(client.baseUri)
5048
}
5149
return tryToConnect(client)
5250
}
5351

54-
private fun updateClientBaseUrl(client:OwnCloudClient, newBaseUrl:String) {
52+
private fun updateClientBaseUrl(client: OwnCloudClient, newBaseUrl: String) {
5553
client.baseUri = Uri.parse(newBaseUrl)
5654
}
5755

0 commit comments

Comments
 (0)