Skip to content

Commit 60e52d7

Browse files
committed
cleanup import
1 parent a416134 commit 60e52d7

File tree

1 file changed

+5
-4
lines changed
  • instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9

1 file changed

+5
-4
lines changed

instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/ResponseInstrumentation.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package io.opentelemetry.javaagent.instrumentation.asynchttpclient.v1_9;
77

88
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
9+
import static io.opentelemetry.javaagent.instrumentation.asynchttpclient.v1_9.AsyncHttpClientSingletons.ASYNC_HANDLER_DATA;
910
import static io.opentelemetry.javaagent.instrumentation.asynchttpclient.v1_9.AsyncHttpClientSingletons.instrumenter;
1011
import static net.bytebuddy.matcher.ElementMatchers.hasSuperClass;
1112
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
@@ -52,11 +53,11 @@ public static class OnCompletedAdvice {
5253
public static Scope onEnter(
5354
@Advice.This AsyncCompletionHandler<?> handler, @Advice.Argument(0) Response response) {
5455

55-
AsyncHandlerData data = AsyncHttpClientSingletons.ASYNC_HANDLER_DATA.get(handler);
56+
AsyncHandlerData data = ASYNC_HANDLER_DATA.get(handler);
5657
if (data == null) {
5758
return null;
5859
}
59-
AsyncHttpClientSingletons.ASYNC_HANDLER_DATA.set(handler, null);
60+
ASYNC_HANDLER_DATA.set(handler, null);
6061
instrumenter().end(data.getContext(), data.getRequest(), response, null);
6162
return data.getParentContext().makeCurrent();
6263
}
@@ -76,11 +77,11 @@ public static class OnThrowableAdvice {
7677
public static Scope onEnter(
7778
@Advice.This AsyncCompletionHandler<?> handler, @Advice.Argument(0) Throwable throwable) {
7879

79-
AsyncHandlerData data = AsyncHttpClientSingletons.ASYNC_HANDLER_DATA.get(handler);
80+
AsyncHandlerData data = ASYNC_HANDLER_DATA.get(handler);
8081
if (data == null) {
8182
return null;
8283
}
83-
AsyncHttpClientSingletons.ASYNC_HANDLER_DATA.set(handler, null);
84+
ASYNC_HANDLER_DATA.set(handler, null);
8485
instrumenter().end(data.getContext(), data.getRequest(), null, throwable);
8586
return data.getParentContext().makeCurrent();
8687
}

0 commit comments

Comments
 (0)