diff --git a/build.gradle b/build.gradle index 015e79c..59fe4fe 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,6 @@ android { defaultConfig { minSdkVersion 15 - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" consumerProguardFiles 'proguard-rules.pro' } } @@ -32,7 +31,6 @@ android { dependencies { api 'com.squareup.okhttp3:okhttp:4.1.1' - implementation 'com.android.support:support-annotations:28.0.0' implementation ('org.simpleframework:simple-xml:2.7.1') { exclude module: 'stax' exclude module: 'stax-api' diff --git a/src/main/java/com/thegrizzlylabs/sardineandroid/impl/BasicAuthenticator.java b/src/main/java/com/thegrizzlylabs/sardineandroid/impl/BasicAuthenticator.java index 0c39876..4d7661e 100644 --- a/src/main/java/com/thegrizzlylabs/sardineandroid/impl/BasicAuthenticator.java +++ b/src/main/java/com/thegrizzlylabs/sardineandroid/impl/BasicAuthenticator.java @@ -1,9 +1,5 @@ package com.thegrizzlylabs.sardineandroid.impl; -import android.support.annotation.NonNull; - -import java.io.IOException; - import okhttp3.Authenticator; import okhttp3.Credentials; import okhttp3.Request; @@ -18,13 +14,13 @@ class BasicAuthenticator implements Authenticator { private String userName; private String password; - public BasicAuthenticator(@NonNull String userName, @NonNull String password) { + public BasicAuthenticator(String userName, String password) { this.userName = userName; this.password = password; } @Override - public Request authenticate(Route route, Response response) throws IOException { + public Request authenticate(Route route, Response response) { if (response.request().header("Authorization") != null) { return null; // Give up, we've already attempted to authenticate. } diff --git a/src/main/java/com/thegrizzlylabs/sardineandroid/impl/OkHttpSardine.java b/src/main/java/com/thegrizzlylabs/sardineandroid/impl/OkHttpSardine.java index 9e82204..dac1a4e 100644 --- a/src/main/java/com/thegrizzlylabs/sardineandroid/impl/OkHttpSardine.java +++ b/src/main/java/com/thegrizzlylabs/sardineandroid/impl/OkHttpSardine.java @@ -1,7 +1,5 @@ package com.thegrizzlylabs.sardineandroid.impl; -import android.support.annotation.NonNull; - import com.thegrizzlylabs.sardineandroid.DavAce; import com.thegrizzlylabs.sardineandroid.DavAcl; import com.thegrizzlylabs.sardineandroid.DavPrincipal; @@ -98,13 +96,13 @@ private class AuthenticationInterceptor implements Interceptor { private String userName; private String password; - public AuthenticationInterceptor(@NonNull String userName, @NonNull String password) { + public AuthenticationInterceptor(String userName, String password) { this.userName = userName; this.password = password; } @Override - public Response intercept(@NonNull Chain chain) throws IOException { + public Response intercept(Chain chain) throws IOException { Request request = chain.request().newBuilder().addHeader("Authorization", Credentials.basic(userName, password)).build(); return chain.proceed(request); } @@ -317,7 +315,7 @@ private void put(String url, RequestBody requestBody) throws IOException { put(url, requestBody, new Headers.Builder().build()); } - private void put(String url, RequestBody requestBody, @NonNull Headers headers) throws IOException { + private void put(String url, RequestBody requestBody, Headers headers) throws IOException { Request request = new Request.Builder() .url(url) .put(requestBody)