From 2f64bc0b89148ea41dbb1d10432d879f67ff2e11 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Thu, 25 Oct 2018 06:36:55 +0200 Subject: [PATCH] apply some Lint fixes --- build.gradle | 1 - .../com/owncloud/android/lib/common/OwnCloudClient.java | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 0a00cb8fae1..3062d34fabb 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,6 @@ buildscript { repositories { google() jcenter() - google() } dependencies { classpath 'com.android.tools.build:gradle:3.3.0' diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClient.java b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClient.java index 52771db3209..321d2ab13a5 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClient.java +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClient.java @@ -61,12 +61,11 @@ public class OwnCloudClient extends HttpClient { private static final String TAG = OwnCloudClient.class.getSimpleName(); private static final int MAX_REDIRECTIONS_COUNT = 3; private static final int MAX_REPEAT_COUNT_WITH_FRESH_CREDENTIALS = 1; - private static final String PARAM_PROTOCOL_VERSION = "http.protocol.version"; private static byte[] sExhaustBuffer = new byte[1024]; private static int sIntanceCounter = 0; private OwnCloudCredentials mCredentials = null; - private int mInstanceNumber = 0; + private int mInstanceNumber; private Uri mBaseUri; private OwnCloudVersion mVersion = null; private OwnCloudAccount mAccount; @@ -330,16 +329,16 @@ private void logSetCookiesAtResponse(Headers headers) { } public String getCookiesString() { - String cookiesString = ""; + StringBuilder cookiesString = new StringBuilder(); List cookieList = getCookiesFromUrl(HttpUrl.parse(mBaseUri.toString())); if (cookieList != null) { for (Cookie cookie : cookieList) { - cookiesString += cookie.toString() + ";"; + cookiesString.append(cookie.toString()).append(";"); } } - return cookiesString; + return cookiesString.toString(); } public void setCookiesForCurrentAccount(List cookies) {