1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Reformat some code

This commit is contained in:
Abel García de Prada 2022-04-25 08:29:47 +02:00
parent be758eb5ea
commit f6eb631fbf
3 changed files with 4 additions and 6 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@
.idea/* .idea/*
!.idea/codeStyles/ !.idea/codeStyles/
sample_client/.idea/*
# files for the dex VM # files for the dex VM
*.dex *.dex

View File

@ -103,7 +103,7 @@ public class OwnCloudClient extends HttpClient {
} }
public int executeHttpMethod(HttpBaseMethod method) throws Exception { public int executeHttpMethod(HttpBaseMethod method) throws Exception {
if(mSynchronizeRequests) { if (mSynchronizeRequests) {
synchronized (mRequestMutex) { synchronized (mRequestMutex) {
return saveExecuteHttpMethod(method); return saveExecuteHttpMethod(method);
} }
@ -116,7 +116,7 @@ public class OwnCloudClient extends HttpClient {
int repeatCounter = 0; int repeatCounter = 0;
int status; int status;
if(mFollowRedirects) { if (mFollowRedirects) {
method.setFollowRedirects(true); method.setFollowRedirects(true);
} }
@ -139,7 +139,7 @@ public class OwnCloudClient extends HttpClient {
if (shouldConnectionValidatorBeCalled(method, status)) { if (shouldConnectionValidatorBeCalled(method, status)) {
retry = mConnectionValidator.validate(this, mSingleSessionManager, getContext()); // retry on success fail on no success retry = mConnectionValidator.validate(this, mSingleSessionManager, getContext()); // retry on success fail on no success
} else if(method.getFollowPermanentRedirects() && status == HTTP_MOVED_PERMANENTLY) { } else if (method.getFollowPermanentRedirects() && status == HTTP_MOVED_PERMANENTLY) {
retry = true; retry = true;
method.setFollowRedirects(true); method.setFollowRedirects(true);
} }

View File

@ -31,7 +31,6 @@ import com.owncloud.android.lib.common.network.NetworkUtils;
import okhttp3.Cookie; import okhttp3.Cookie;
import okhttp3.CookieJar; import okhttp3.CookieJar;
import okhttp3.HttpUrl; import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Protocol; import okhttp3.Protocol;
import okhttp3.TlsVersion; import okhttp3.TlsVersion;
@ -61,7 +60,7 @@ public class HttpClient {
private OkHttpClient mOkHttpClient = null; private OkHttpClient mOkHttpClient = null;
protected HttpClient(Context context) { protected HttpClient(Context context) {
if(context == null) { if (context == null) {
Timber.e("Context may not be NULL!"); Timber.e("Context may not be NULL!");
throw new NullPointerException("Context may not be NULL!"); throw new NullPointerException("Context may not be NULL!");
} }