-
Notifications
You must be signed in to change notification settings - Fork 637
Fix child/parent class enhancement issue during retransform #756
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
base: main
Are you sure you want to change the base?
Conversation
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.
license-eye has totally checked 5486 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
5240 | 2 | 244 | 0 |
Click to see the invalid file list
- apm-sniffer/bytebuddy-patch/src/test/java/org/apache/skywalking/apm/agent/bytebuddy/biz/ChildBar.java
- apm-sniffer/bytebuddy-patch/src/test/java/org/apache/skywalking/apm/agent/bytebuddy/biz/ParentBar.java
...er/bytebuddy-patch/src/test/java/org/apache/skywalking/apm/agent/bytebuddy/biz/ChildBar.java
Show resolved
Hide resolved
...r/bytebuddy-patch/src/test/java/org/apache/skywalking/apm/agent/bytebuddy/biz/ParentBar.java
Show resolved
Hide resolved
...sniffer/bytebuddy-patch/src/main/java/net/bytebuddy/agent/builder/SWDescriptionStrategy.java
Outdated
Show resolved
Hide resolved
private final TypeDescription.Generic superGeneric; | ||
|
||
protected ForLoadedSuperClassWrapper(TypeDescription delegation, TypeDescription.Generic superGeneric) { | ||
super(null); // HACK: a trick here since type is not used anywhere in the wrapper |
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.
Has the wrapper overrided all methods of ForLoadedSuperClass? I want to guarantee that the null
would not be used unexpectedly.
If yes, could you add a UT to check that? This could prevent upgrade issue if byte-buddy core adds a method in the future.
Fix retransform bug if parent class has also been enhanced
Add a unit test to verify that the fix works.
Explain briefly why the bug exists and how to fix it.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGES
log.This PR adds a unit test to reproduce a retransform issue:
When a child class extends a parent class and the both classes need to be enhanced by SkyWalking Agent, retransform will fail since
getter/setter
are not generated in the child class.