Skip to content

Commit bf78551

Browse files
committed
Making http package params not null by default
1 parent 438b875 commit bf78551

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/OkHttpSender.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.io.IOException;
99
import java.io.InputStream;
1010
import java.util.concurrent.CompletableFuture;
11-
import javax.annotation.Nonnull;
1211
import javax.annotation.Nullable;
1312
import okhttp3.Call;
1413
import okhttp3.Callback;
@@ -51,12 +50,12 @@ public CompletableFuture<Response> send(BodyWriter writer, int contentLength) {
5150
.enqueue(
5251
new Callback() {
5352
@Override
54-
public void onResponse(@Nonnull Call call, @Nonnull okhttp3.Response response) {
53+
public void onResponse(Call call, okhttp3.Response response) {
5554
future.complete(new OkHttpResponse(response));
5655
}
5756

5857
@Override
59-
public void onFailure(@Nonnull Call call, @Nonnull IOException e) {
58+
public void onFailure(Call call, IOException e) {
6059
future.completeExceptionally(e);
6160
}
6261
});
@@ -120,7 +119,7 @@ public long contentLength() {
120119
}
121120

122121
@Override
123-
public void writeTo(@Nonnull BufferedSink bufferedSink) throws IOException {
122+
public void writeTo(BufferedSink bufferedSink) throws IOException {
124123
writer.writeTo(bufferedSink.outputStream());
125124
}
126125
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
@ParametersAreNonnullByDefault
7+
package io.opentelemetry.opamp.client.internal.connectivity.http;
8+
9+
import javax.annotation.ParametersAreNonnullByDefault;

0 commit comments

Comments
 (0)