switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable`
MODIFY
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpClientAttributesExtractor.java
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpClientAttributesExtractor.java
@@ -10,7 +10,7 @@ import akka.http.scaladsl.model.HttpResponse;
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesExtractor;
import io.opentelemetry.javaagent.instrumentation.akkahttp.AkkaHttpUtil;
import java.util.List;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class AkkaHttpClientAttributesExtractor
extends HttpClientAttributesExtractor<HttpRequest, HttpResponse> {
@@ -35,13 +35,15 @@ class AkkaHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long requestContentLength(
+ @Nullable
+ protected Long requestContentLength(
HttpRequest httpRequest, @Nullable HttpResponse httpResponse) {
return null;
}
@Override
- protected @Nullable Long requestContentLengthUncompressed(
+ @Nullable
+ protected Long requestContentLengthUncompressed(
HttpRequest httpRequest, @Nullable HttpResponse httpResponse) {
return null;
}
@@ -52,13 +54,14 @@ class AkkaHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long responseContentLength(
- HttpRequest httpRequest, HttpResponse httpResponse) {
+ @Nullable
+ protected Long responseContentLength(HttpRequest httpRequest, HttpResponse httpResponse) {
return null;
}
@Override
- protected @Nullable Long responseContentLengthUncompressed(
+ @Nullable
+ protected Long responseContentLengthUncompressed(
HttpRequest httpRequest, HttpResponse httpResponse) {
return null;
}

MODIFY
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesExtractor.java
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesExtractor.java
@@ -9,7 +9,7 @@ import akka.http.scaladsl.model.HttpRequest;
import akka.http.scaladsl.model.HttpResponse;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class AkkaHttpNetAttributesExtractor
extends NetClientAttributesExtractor<HttpRequest, HttpResponse> {
@@ -29,7 +29,8 @@ class AkkaHttpNetAttributesExtractor
}
@Override
- public @Nullable String peerIp(HttpRequest httpRequest, @Nullable HttpResponse httpResponse) {
+ @Nullable
+ public String peerIp(HttpRequest httpRequest, @Nullable HttpResponse httpResponse) {
return null;
}
}

MODIFY
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaHttpServerAttributesExtractor.java
instrumentation/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaHttpServerAttributesExtractor.java
@@ -10,7 +10,7 @@ import akka.http.scaladsl.model.HttpResponse;
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpServerAttributesExtractor;
import io.opentelemetry.javaagent.instrumentation.akkahttp.AkkaHttpUtil;
import java.util.List;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
import scala.Option;
class AkkaHttpServerAttributesExtractor
@@ -27,13 +27,14 @@ class AkkaHttpServerAttributesExtractor
}
@Override
- protected @Nullable Long requestContentLength(
- HttpRequest request, @Nullable HttpResponse httpResponse) {
+ @Nullable
+ protected Long requestContentLength(HttpRequest request, @Nullable HttpResponse httpResponse) {
return null;
}
@Override
- protected @Nullable Long requestContentLengthUncompressed(
+ @Nullable
+ protected Long requestContentLengthUncompressed(
HttpRequest request, @Nullable HttpResponse httpResponse) {
return null;
}
@@ -44,13 +45,14 @@ class AkkaHttpServerAttributesExtractor
}
@Override
- protected @Nullable Long responseContentLength(HttpRequest request, HttpResponse httpResponse) {
+ @Nullable
+ protected Long responseContentLength(HttpRequest request, HttpResponse httpResponse) {
return null;
}
@Override
- protected @Nullable Long responseContentLengthUncompressed(
- HttpRequest request, HttpResponse httpResponse) {
+ @Nullable
+ protected Long responseContentLengthUncompressed(HttpRequest request, HttpResponse httpResponse) {
return null;
}
@@ -76,7 +78,8 @@ class AkkaHttpServerAttributesExtractor
}
@Override
- protected @Nullable String route(HttpRequest request) {
+ @Nullable
+ protected String route(HttpRequest request) {
return null;
}
@@ -86,7 +89,8 @@ class AkkaHttpServerAttributesExtractor
}
@Override
- protected @Nullable String serverName(HttpRequest request, @Nullable HttpResponse httpResponse) {
+ @Nullable
+ protected String serverName(HttpRequest request, @Nullable HttpResponse httpResponse) {
return null;
}
}

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/ApiGatewayProxyAttributesExtractor.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/ApiGatewayProxyAttributesExtractor.java
@@ -23,7 +23,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Map;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
final class ApiGatewayProxyAttributesExtractor
implements AttributesExtractor<AwsLambdaRequest, Object> {

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/AwsLambdaFunctionAttributesExtractor.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/AwsLambdaFunctionAttributesExtractor.java
@@ -16,7 +16,7 @@ import io.opentelemetry.instrumentation.awslambda.v1_0.AwsLambdaRequest;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class AwsLambdaFunctionAttributesExtractor
implements AttributesExtractor<AwsLambdaRequest, Object> {

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/AwsLambdaFunctionInstrumenter.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/AwsLambdaFunctionInstrumenter.java
@@ -12,7 +12,7 @@ import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.instrumentation.api.internal.ContextPropagationDebug;
import io.opentelemetry.instrumentation.awslambda.v1_0.AwsLambdaRequest;
import java.util.Map;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
public class AwsLambdaFunctionInstrumenter {

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/SqsEventAttributesExtractor.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/SqsEventAttributesExtractor.java
@@ -9,7 +9,7 @@ import com.amazonaws.services.lambda.runtime.events.SQSEvent;
import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class SqsEventAttributesExtractor implements AttributesExtractor<SQSEvent, Void> {
@Override

MODIFY
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/SqsMessageAttributesExtractor.java
instrumentation/aws-lambda-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambda/v1_0/internal/SqsMessageAttributesExtractor.java
@@ -9,7 +9,7 @@ import com.amazonaws.services.lambda.runtime.events.SQSEvent.SQSMessage;
import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class SqsMessageAttributesExtractor implements AttributesExtractor<SQSMessage, Void> {
@Override

MODIFY
instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoAttributesExtractor.java
instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoAttributesExtractor.java
@@ -13,8 +13,8 @@ import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import java.util.HashSet;
import java.util.Set;
+import javax.annotation.Nullable;
import org.bson.BsonValue;
-import org.checkerframework.checker.nullness.qual.Nullable;
class MongoAttributesExtractor implements AttributesExtractor<CommandStartedEvent, Void> {
@Override

MODIFY
instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesExtractor.java
instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesExtractor.java
@@ -8,12 +8,13 @@ package io.opentelemetry.instrumentation.mongo.v3_1;
import com.mongodb.event.CommandStartedEvent;
import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesExtractor;
import java.net.InetSocketAddress;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
class MongoNetAttributesExtractor
extends InetSocketAddressNetClientAttributesExtractor<CommandStartedEvent, Void> {
@Override
- public @Nullable InetSocketAddress getAddress(CommandStartedEvent event, @Nullable Void unused) {
+ @Nullable
+ public InetSocketAddress getAddress(CommandStartedEvent event, @Nullable Void unused) {
if (event.getConnectionDescription() != null
&& event.getConnectionDescription().getServerAddress() != null) {
return event.getConnectionDescription().getServerAddress().getSocketAddress();
@@ -23,8 +24,8 @@ class MongoNetAttributesExtractor
}
@Override
- public @Nullable String transport(
- CommandStartedEvent commandStartedEvent, @Nullable Void unused) {
+ @Nullable
+ public String transport(CommandStartedEvent commandStartedEvent, @Nullable Void unused) {
return null;
}
}

MODIFY
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyClientRequestAndContexts.java
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyClientRequestAndContexts.java
@@ -8,7 +8,7 @@ package io.opentelemetry.javaagent.instrumentation.netty.v3_8.client;
import com.google.auto.value.AutoValue;
import io.opentelemetry.context.Context;
import io.opentelemetry.javaagent.instrumentation.netty.v3_8.HttpRequestAndChannel;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
@AutoValue
abstract class NettyClientRequestAndContexts {

MODIFY
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyHttpClientAttributesExtractor.java
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyHttpClientAttributesExtractor.java
@@ -10,14 +10,15 @@ import io.opentelemetry.javaagent.instrumentation.netty.v3_8.HttpRequestAndChann
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
import org.jboss.netty.handler.codec.http.HttpResponse;
final class NettyHttpClientAttributesExtractor
extends HttpClientAttributesExtractor<HttpRequestAndChannel, HttpResponse> {
@Override
- protected @Nullable String url(HttpRequestAndChannel requestAndChannel) {
+ @Nullable
+ protected String url(HttpRequestAndChannel requestAndChannel) {
try {
String hostHeader = getHost(requestAndChannel);
String target = requestAndChannel.request().getUri();
@@ -58,13 +59,15 @@ final class NettyHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long requestContentLength(
+ @Nullable
+ protected Long requestContentLength(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}
@Override
- protected @Nullable Long requestContentLengthUncompressed(
+ @Nullable
+ protected Long requestContentLengthUncompressed(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}
@@ -75,13 +78,15 @@ final class NettyHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long responseContentLength(
+ @Nullable
+ protected Long responseContentLength(
HttpRequestAndChannel requestAndChannel, HttpResponse response) {
return null;
}
@Override
- protected @Nullable Long responseContentLengthUncompressed(
+ @Nullable
+ protected Long responseContentLengthUncompressed(
HttpRequestAndChannel requestAndChannel, HttpResponse response) {
return null;
}

MODIFY
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyNetClientAttributesExtractor.java
instrumentation/netty/netty-3.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/NettyNetClientAttributesExtractor.java
@@ -9,14 +9,15 @@ import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNe
import io.opentelemetry.javaagent.instrumentation.netty.v3_8.HttpRequestAndChannel;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
import org.jboss.netty.handler.codec.http.HttpResponse;
final class NettyNetClientAttributesExtractor
extends InetSocketAddressNetClientAttributesExtractor<HttpRequestAndChannel, HttpResponse> {
@Override
- public @Nullable InetSocketAddress getAddress(
+ @Nullable
+ public InetSocketAddress getAddress(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
SocketAddress address = requestAndChannel.channel().getRemoteAddress();
if (address instanceof InetSocketAddress) {
@@ -26,7 +27,8 @@ final class NettyNetClientAttributesExtractor
}
@Override
- public @Nullable String transport(
+ @Nullable
+ public String transport(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}

MODIFY
instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/client/NettyHttpClientAttributesExtractor.java
instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/client/NettyHttpClientAttributesExtractor.java
@@ -12,7 +12,7 @@ import io.opentelemetry.javaagent.instrumentation.netty.common.HttpRequestAndCha
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
final class NettyHttpClientAttributesExtractor
extends HttpClientAttributesExtractor<HttpRequestAndChannel, HttpResponse> {
@@ -33,7 +33,8 @@ final class NettyHttpClientAttributesExtractor
}
@Override
- protected @Nullable String url(HttpRequestAndChannel requestAndChannel) {
+ @Nullable
+ protected String url(HttpRequestAndChannel requestAndChannel) {
try {
String hostHeader = getHost(requestAndChannel);
String target = requestAndChannel.request().getUri();
@@ -75,13 +76,15 @@ final class NettyHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long requestContentLength(
+ @Nullable
+ protected Long requestContentLength(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}
@Override
- protected @Nullable Long requestContentLengthUncompressed(
+ @Nullable
+ protected Long requestContentLengthUncompressed(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}
@@ -92,13 +95,15 @@ final class NettyHttpClientAttributesExtractor
}
@Override
- protected @Nullable Long responseContentLength(
+ @Nullable
+ protected Long responseContentLength(
HttpRequestAndChannel requestAndChannel, HttpResponse response) {
return null;
}
@Override
- protected @Nullable Long responseContentLengthUncompressed(
+ @Nullable
+ protected Long responseContentLengthUncompressed(
HttpRequestAndChannel requestAndChannel, HttpResponse response) {
return null;
}

MODIFY
instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/client/NettyNetClientAttributesExtractor.java
instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/client/NettyNetClientAttributesExtractor.java
@@ -10,13 +10,14 @@ import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNe
import io.opentelemetry.javaagent.instrumentation.netty.common.HttpRequestAndChannel;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import javax.annotation.Nullable;
final class NettyNetClientAttributesExtractor
extends InetSocketAddressNetClientAttributesExtractor<HttpRequestAndChannel, HttpResponse> {
@Override
- public @Nullable InetSocketAddress getAddress(
+ @Nullable
+ public InetSocketAddress getAddress(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
SocketAddress address = requestAndChannel.channel().remoteAddress();
if (address instanceof InetSocketAddress) {
@@ -26,7 +27,8 @@ final class NettyNetClientAttributesExtractor
}
@Override
- public @Nullable String transport(
+ @Nullable
+ public String transport(
HttpRequestAndChannel requestAndChannel, @Nullable HttpResponse response) {
return null;
}

switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable` (#4418)