Replace hasSuperType with safeHasSuperType
package datadog.trace.instrumentation.springwebflux.client;
+import static datadog.trace.agent.tooling.ByteBuddyElementMatchers.safeHasSuperType;
import static java.util.Collections.singletonMap;
-import static net.bytebuddy.matcher.ElementMatchers.hasSuperType;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -38,7 +38,8 @@ public class DefaultWebClientInstrumentation extends Instrumenter.Default {
@Override
public ElementMatcher<? super TypeDescription> typeMatcher() {
- return hasSuperType(named("org.springframework.web.reactive.function.client.ExchangeFunction"));
+ return safeHasSuperType(
+ named("org.springframework.web.reactive.function.client.ExchangeFunction"));
}
@Override
