`classLoaderOptimization` is not needed when matching by name (#8010)

This commit is contained in:
Lauri Tulmin 2023-03-08 20:09:20 +02:00 committed by GitHub
parent ff73e9577c
commit 6c5351305c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -5,7 +5,6 @@
package io.opentelemetry.javaagent.instrumentation.oshi;
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
import static net.bytebuddy.matcher.ElementMatchers.isStatic;
@ -18,11 +17,6 @@ import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
public class SystemInfoInstrumentation implements TypeInstrumentation {
@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
return hasClassesNamed("oshi.SystemInfo");
}
@Override
public ElementMatcher<TypeDescription> typeMatcher() {
return named("oshi.SystemInfo");