Skip to content

Commit

Permalink
(chore) remove indy specific inlining per review
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrengelman committed Nov 14, 2024
1 parent 093aeaa commit c7e5d8b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void transform(TypeTransformer transformer) {

@SuppressWarnings("unused")
public static class SetInitializersAdvice {
@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
@Advice.OnMethodEnter(suppress = Throwable.class)
@Advice.AssignReturned.ToArguments(@ToArgument(0))
public static ImmutableList<? extends ExecInitializer> enter(
@Advice.Argument(0) ImmutableList<? extends ExecInitializer> initializers) {
Expand All @@ -61,7 +61,7 @@ public static ImmutableList<? extends ExecInitializer> enter(

@SuppressWarnings("unused")
public static class SetInterceptorsAdvice {
@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
@Advice.OnMethodEnter(suppress = Throwable.class)
@Advice.AssignReturned.ToArguments(@ToArgument(0))
public static ImmutableList<? extends ExecInterceptor> enter(
@Advice.Argument(0) ImmutableList<? extends ExecInterceptor> interceptors) {
Expand All @@ -76,7 +76,7 @@ public static ImmutableList<? extends ExecInterceptor> enter(
public static class ConstructorAdvice {

@SuppressWarnings("UnusedVariable")
@Advice.OnMethodExit(suppress = Throwable.class, inline = false)
@Advice.OnMethodExit(suppress = Throwable.class)
@Advice.AssignReturned.ToFields({
@ToField(value = "initializers", index = 0),
@ToField(value = "interceptors", index = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void transform(TypeTransformer transformer) {
@SuppressWarnings("unused")
public static class OfAdvice {

@Advice.OnMethodExit(suppress = Throwable.class, inline = false)
@Advice.OnMethodExit(suppress = Throwable.class)
@Advice.AssignReturned.ToReturned
public static HttpClient injectTracing(@Advice.Return HttpClient httpClient) throws Exception {
return RatpackSingletons.telemetry().instrumentHttpClient(httpClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public String getModuleGroup() {
return "netty";
}

@Override
public boolean isIndyModule() {
return true;
}

@Override
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
// Only activate when running ratpack 1.7 or later
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void injectChannelAttribute(
@SuppressWarnings("unused")
public static class ConnectDownstreamAdvice {

@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
@Advice.OnMethodEnter(suppress = Throwable.class)
@Advice.AssignReturned.ToArguments(@ToArgument(0))
public static Object wrapDownstream(@Advice.Argument(0) Downstream<?> downstream) {
// Propagate the current context to downstream
Expand All @@ -73,7 +73,7 @@ public static Object wrapDownstream(@Advice.Argument(0) Downstream<?> downstream
@SuppressWarnings("unused")
public static class ContextAdvice {

@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
@Advice.OnMethodEnter(suppress = Throwable.class)
public static Scope injectChannelAttribute(
@Advice.FieldValue("execution") Execution execution) {

Expand All @@ -85,7 +85,7 @@ public static Scope injectChannelAttribute(
.orElse(null);
}

@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class, inline = false)
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
public static void exit(@Advice.Enter Scope scope) {
if (scope != null) {
scope.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void transform(TypeTransformer transformer) {
@SuppressWarnings("unused")
public static class BuildAdvice {

@Advice.OnMethodExit(suppress = Throwable.class, inline = false)
@Advice.OnMethodExit(suppress = Throwable.class)
@Advice.AssignReturned.ToReturned
public static Registry injectTracing(@Advice.Return Registry registry) {
return registry.join(
Expand Down

0 comments on commit c7e5d8b

Please sign in to comment.