Small optimization (#4293)
This commit is contained in:
parent
7448ebf306
commit
0994c07bcf
|
@ -6,15 +6,11 @@
|
|||
package io.opentelemetry.javaagent.tooling.ignore;
|
||||
|
||||
import io.opentelemetry.javaagent.instrumentation.api.util.Trie;
|
||||
import java.util.regex.Pattern;
|
||||
import net.bytebuddy.description.type.TypeDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
||||
public class IgnoredTypesMatcher extends ElementMatcher.Junction.AbstractBase<TypeDescription> {
|
||||
|
||||
private static final Pattern COM_MCHANGE_PROXY =
|
||||
Pattern.compile("com\\.mchange\\.v2\\.c3p0\\..*Proxy");
|
||||
|
||||
private final Trie<IgnoreAllow> ignoredTypes;
|
||||
|
||||
public IgnoredTypesMatcher(Trie<IgnoreAllow> ignoredTypes) {
|
||||
|
@ -53,6 +49,10 @@ public class IgnoredTypesMatcher extends ElementMatcher.Junction.AbstractBase<Ty
|
|||
return true;
|
||||
}
|
||||
|
||||
return COM_MCHANGE_PROXY.matcher(name).matches();
|
||||
if (name.startsWith("com.mchange.v2.c3p0.") && name.endsWith("Proxy")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue