Decouple jar scanning function from class match vistor collection #1462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1342
Currently, the jar collector functionality is implemented via the ClassMatchVisitor pattern. The problem with this approach is that the registered visitors aren't executed when a class is excluded from transformation. In the case of certain jars (Spring Security for example), every single class in the jar is excluded, so the visitors are never executed, so the jar collector is never aware of the enclosing jar.
This PR keeps the exact same jar discovery logic in place, however the flow is no longer invoked after a class is transformed. Instead, all classes, prior to being checked for transformation eligibility are submitted to the jar collector. This means that no jars will be missed, even if every class within a jar is excluded, skipped, etc.