diff --git a/build.gradle b/build.gradle index 8c99074..08f4f17 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,6 @@ allprojects { dependencies { compile "com.squareup.okhttp3:okhttp:3.8.1" compile "org.slf4j:slf4j-api:1.7.22" - compile "com.google.code.findbugs:jsr305:3.0.2" testRuntime "ch.qos.logback:logback-classic:1.1.9" testCompile "org.mockito:mockito-core:1.10.19" testCompile "junit:junit:4.11" diff --git a/src/main/java/com/launchdarkly/eventsource/EventSource.java b/src/main/java/com/launchdarkly/eventsource/EventSource.java index 3916c17..a130534 100644 --- a/src/main/java/com/launchdarkly/eventsource/EventSource.java +++ b/src/main/java/com/launchdarkly/eventsource/EventSource.java @@ -7,7 +7,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.Nullable; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; @@ -69,7 +68,7 @@ public class EventSource implements ConnectionHandler, Closeable { private volatile HttpUrl url; private final Headers headers; private final String method; - @Nullable private final RequestBody body; + private final RequestBody body; private final RequestTransformer requestTransformer; private final ExecutorService eventExecutor; private final ExecutorService streamExecutor; @@ -506,7 +505,7 @@ public static final class Builder { private Authenticator proxyAuthenticator = null; private String method = "GET"; private RequestTransformer requestTransformer = null; - @Nullable private RequestBody body = null; + private RequestBody body = null; private OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .connectionPool(new ConnectionPool(1, 1, TimeUnit.SECONDS)) .connectTimeout(DEFAULT_CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS) @@ -565,7 +564,7 @@ public Builder method(String method) { * @param body the body to use in HTTP requests * @return the builder */ - public Builder body(@Nullable RequestBody body) { + public Builder body(RequestBody body) { this.body = body; return this; } @@ -578,7 +577,7 @@ public Builder body(@Nullable RequestBody body) { * * @since 1.9.0 */ - public Builder requestTransformer(@Nullable RequestTransformer requestTransformer) { + public Builder requestTransformer(RequestTransformer requestTransformer) { this.requestTransformer = requestTransformer; return this; }