change the way classes are loaded so that classLoaderHasClasses would still work for the classes that are being instrumented and being matched at the same time.
This commit is contained in:
parent
42b586badf
commit
fdc56c0e13
|
@ -142,16 +142,14 @@ public class ClassLoaderMatcher {
|
||||||
if (cache.containsKey(target)) {
|
if (cache.containsKey(target)) {
|
||||||
return cache.get(target);
|
return cache.get(target);
|
||||||
}
|
}
|
||||||
try {
|
for (final String name : names) {
|
||||||
for (final String name : names) {
|
if (target.getResource(Utils.getResourceName(name)) == null) {
|
||||||
Class.forName(name, false, target);
|
cache.put(target, false);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
cache.put(target, true);
|
|
||||||
return true;
|
|
||||||
} catch (final ClassNotFoundException e) {
|
|
||||||
cache.put(target, false);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
cache.put(target, true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue