Move ThreadPoolExecutor helper to bootstrap
ADD
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/java/concurrent/GenericRunnable.java
+package datadog.trace.bootstrap.instrumentation.java.concurrent;
+
+/** Used by ThreadPoolExecutorInstrumentation to check executor support */
+public class GenericRunnable implements Runnable {
+
+ @Override
+ public void run() {}
+}

MODIFY
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/ThreadPoolExecutorInstrumentation.java
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/ThreadPoolExecutorInstrumentation.java
@@ -9,6 +9,7 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.bootstrap.instrumentation.java.concurrent.ExecutorInstrumentationUtils;
+import datadog.trace.bootstrap.instrumentation.java.concurrent.GenericRunnable;
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
@@ -36,13 +37,6 @@ public class ThreadPoolExecutorInstrumentation extends Instrumenter.Default {
return named("java.util.concurrent.ThreadPoolExecutor");
}
- @Override
- public String[] helperClassNames() {
- return new String[] {
- ThreadPoolExecutorInstrumentation.class.getName() + "$GenericRunnable",
- };
- }
-
@Override
public Map<? extends ElementMatcher<? super MethodDescription>, String> transformers() {
return singletonMap(
@@ -73,10 +67,4 @@ public class ThreadPoolExecutorInstrumentation extends Instrumenter.Default {
}
}
}
-
- public static class GenericRunnable implements Runnable {
-
- @Override
- public void run() {}
- }
}

Move ThreadPoolExecutor helper to bootstrap