Skip to content

Commit c1e8f73

Browse files
committed
Fixing nullable issues
1 parent 9436b6d commit c1e8f73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

noop-api/src/main/java/io/opentelemetry/contrib/noopapi/NoopTracerProvider.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import io.opentelemetry.api.trace.TracerProvider;
1616
import io.opentelemetry.context.Context;
1717
import java.util.concurrent.TimeUnit;
18+
import javax.annotation.Nullable;
1819

1920
enum NoopTracerProvider implements TracerProvider {
2021
INSTANCE;
@@ -62,7 +63,7 @@ public SpanBuilder addLink(SpanContext spanContext, Attributes attributes) {
6263
}
6364

6465
@Override
65-
public SpanBuilder setAttribute(String key, String value) {
66+
public SpanBuilder setAttribute(String key, @Nullable String value) {
6667
return this;
6768
}
6869

@@ -82,7 +83,7 @@ public SpanBuilder setAttribute(String key, boolean value) {
8283
}
8384

8485
@Override
85-
public <T> SpanBuilder setAttribute(AttributeKey<T> key, T value) {
86+
public <T> SpanBuilder setAttribute(AttributeKey<T> key, @Nullable T value) {
8687
return this;
8788
}
8889

0 commit comments

Comments
 (0)