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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indy instrumentation - leftovers migration #13074
indy instrumentation - leftovers migration #13074
Changes from 16 commits
c911faa
26e79f9
7f3ae3b
9183992
29c99dd
45ead47
ba30ba8
eb945b8
eba7e20
7a1cbc7
590f86e
a8cbb24
403caaa
506cc62
da1c13d
c4350d0
1d54a14
03aa810
2ed4e96
77a4f00
d9cd13f
5e2ef89
20856e3
a38763f
b77428c
bc785b9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't immediately get why you wanted to change this, but I guess it is to reduce the helper classes and push more logic into the agent code. I think this is good idea and getting rid for the extra module for java9 is nice. What I'd change is that I'd probably also rename
ClassFileTransformerHolder
as it is only for lambdas as you noted. Also I'd consider not usingClassFileTransformer
here. Passing thetargetClass
argument to the transform method confused me a bit astransform
should have the class there only when retransforming/redefining which we aren't doing here. You could have an interface inClassFileTransformerHolder
that takes the necessary arguments. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on the
ClassFileTransformerHolder
rename as it's definitely only used for lambdas.I initially tried to simplify the design/API but that requires to introduce a new interface, so I thought maybe keep reusing
ClassFileTransformer
could be an acceptable compromise, but I agree that it might be a bit confusing as the implementations details leak into the callers as shown by the quantity of comments to use it the way it's intended.I'll do another attempt by introducing a new interface to see if it helps improve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] this is only used for lambda, and the
ClassFileTransformer
instances that are used here are very specific to lambda instrumentation, so renaming helps keep it clear.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] wrapping at registration time helps to make the consumer transparently use it with java 8 API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] there is no need to maintain an inline and indy variants of this instrumentation, so we only need one that is compatible with both.