Don't need to collect mismatches in the critical path
This commit is contained in:
parent
5ebc13cafa
commit
3b78d4593f
|
@ -56,20 +56,17 @@ public class ReferenceMatcher implements WeakMap.ValueSupplier<ClassLoader, Bool
|
|||
|
||||
@Override
|
||||
public Boolean get(final ClassLoader loader) {
|
||||
final List<Mismatch> mismatches = new ArrayList<>();
|
||||
|
||||
for (final Reference reference : references) {
|
||||
if (mismatches.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// Don't reference-check helper classes.
|
||||
// They will be injected by the instrumentation's HelperInjector.
|
||||
if (!helperClassNames.contains(reference.getClassName())) {
|
||||
mismatches.addAll(checkMatch(reference, loader));
|
||||
if (!checkMatch(reference, loader).isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mismatches.size() == 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue