Skip to content

Commit 71afc51

Browse files
committed
Address review comments
1 parent cf202b2 commit 71afc51

File tree

1 file changed

+3
-4
lines changed
  • instrumentation/async-http-client/async-http-client-1-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common

1 file changed

+3
-4
lines changed

instrumentation/async-http-client/async-http-client-1-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/AsyncHandlerData.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.ning.http.client.Response;
1111
import io.opentelemetry.context.Context;
1212
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
13+
import javax.annotation.Nullable;
1314

1415
@AutoValue
1516
public abstract class AsyncHandlerData {
@@ -30,10 +31,8 @@ public static AsyncHandlerData create(
3031

3132
public abstract Instrumenter<Request, Response> getInstrumenter();
3233

33-
public void end(Response response, Throwable throwable) {
34+
public void end(@Nullable Response response, @Nullable Throwable throwable) {
3435
Instrumenter<Request, Response> instrumenter = getInstrumenter();
35-
if (instrumenter != null) {
36-
instrumenter.end(getContext(), getRequest(), response, throwable);
37-
}
36+
instrumenter.end(getContext(), getRequest(), response, throwable);
3837
}
3938
}

0 commit comments

Comments
 (0)