Skip to content
Browse files

excluding proxy classes from search

  • Loading branch information...
arcuri82 committed Sep 29, 2019
1 parent 11cef0f commit 22dc92d81b65419d8b5e5ac1b1f17eddce2afb42
@@ -90,7 +90,18 @@ public Instrumentator(String packagePrefixesToCover) {

private boolean canInstrumentForCoverage(ClassName className){

.anyMatch(s -> className.getFullNameWithDots().startsWith(s));
String name = className.getFullNameWithDots();

we need to exclude classes that are automatically generated at runtime, eg like
proxies in Spring.
TODO is there an easy way to detect it besides checking for pattern names common in
existing libraries? Doesn't look like...
List<String> exclusions = Arrays.asList("BySpringCGLIB");

return -> name.startsWith(s))
&& -> name.contains(s));

0 comments on commit 22dc92d

Please sign in to comment.
You can’t perform that action at this time.