Skip to content

Commit 7118b00

Browse files
committed
chore: tidy up from PR review
1 parent 0949b72 commit 7118b00

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

instrumentation/finagle-http-23.11/compile-stub/src/main/java/com/twitter/util/Promise.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
package com.twitter.util;
77

88
// public accessible stubs of mirrored types in com.twitter.util to ensure compilation;
9-
// these must be stripped out at jar construction -- see build.gradle.kts
9+
// these classes are consumed as a compileOnly module and replaced at runtime with their
10+
// stubbed counterparts
1011
public class Promise {
1112
private Promise() {}
1213

instrumentation/finagle-http-23.11/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/finaglehttp/v23_11/ChannelTransportInstrumentation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public ElementMatcher<TypeDescription> typeMatcher() {
2424

2525
@Override
2626
public void transform(TypeTransformer transformer) {
27-
transformer.applyAdviceToMethod(
28-
isConstructor(), ChannelTransportInstrumentation.class.getName() + "$ConstructorAdvice");
27+
transformer.applyAdviceToMethod(isConstructor(), getClass().getName() + "$ConstructorAdvice");
2928
}
3029

3130
@SuppressWarnings("unused")

instrumentation/finagle-http-23.11/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/finaglehttp/v23_11/PromiseInterruptibleInstrumentation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public static PartialFunction<Throwable, BoxedUnit> onExit(
4444
if (handler instanceof TwitterUtilCoreHelpers.InterruptibleWithContext) {
4545
return handler;
4646
}
47-
Context context = Context.current();
48-
return new TwitterUtilCoreHelpers.InterruptibleWithContext(context, handler);
47+
return new TwitterUtilCoreHelpers.InterruptibleWithContext(Context.current(), handler);
4948
}
5049
}
5150
}

instrumentation/finagle-http-23.11/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/finaglehttp/v23_11/PromiseKInstrumentation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ public static void onExit(
5151
@Advice.This
5252
@SuppressWarnings("rawtypes") // type is from compile-stub and masks private type
5353
Promise.K thiz) {
54-
Context current = Context.current();
55-
TwitterUtilCoreHelpers.PROMISE_K_CONTEXT_FIELD.set(thiz, current);
54+
TwitterUtilCoreHelpers.PROMISE_K_CONTEXT_FIELD.set(thiz, Context.current());
5655
}
5756
}
5857

0 commit comments

Comments
 (0)