Merge pull request #413 from DataDog/ark/muzzle-helper-skip

Don't check for helper classes in muzzle reference check
This commit is contained in:
Andrew Kent 2018-07-27 11:24:09 -07:00 committed by GitHub
commit c536fd8c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -120,11 +120,7 @@ public class Reference {
private boolean onClasspath(final String className, final ClassLoader loader) {
final String resourceName = Utils.getResourceName(className);
return loader.getResource(resourceName) != null
// helper classes are not on the resource path because they are loaded with reflection (See
// HelperInjector)
|| (className.startsWith("datadog.trace.")
&& Utils.findLoadedClass(className, loader) != null)
// bootstrap class
// we can also reach bootstrap classes
|| Utils.getBootstrapProxy().getResource(resourceName) != null;
}