-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Remove some uses of ClassLoadingStrategy.Default.INJECTION #30367
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
Conversation
|
R: @Abacn |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
| .visit(new AsmVisitorWrapper.ForDeclaredMethods().writerFlags(ClassWriter.COMPUTE_FRAMES)) | ||
| .make() | ||
| .load(ReflectHelpers.findClassLoader(), ClassLoadingStrategy.Default.INJECTION) | ||
| .load(ReflectHelpers.findClassLoader(), getClassLoadingStrategy(protoClass)) |
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.
while the change of all other files follow the same pattern, the use case here looks slightly different. Would you mind providing some hint to the changes in ProroByteBuddyUtil ?
Or if there is anything not sure, we can leave this file untouched. I just recall the last time of this effort (#23210) broke some test and had some back and forth. I was wondering if any remaining usage Default.INJECTION not removed in #25578 was due to that it is nontrivial
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.
the class used was the one used for package injection in the helper method.
But since I'm not sure how to best test this and it wasn't directly causing issues for me I'm removing from this PR.
Abacn
left a comment
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.
Thank you!
Remove some uses of ClassLoadingStrategy.Default.INJECTION in favor of
ByteBuddyUtils.getClassLoadingStrategy which prevents issues with newer java versions.
See #25578 for more details
Related to #30358
There are more changes required in sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoByteBuddyUtils.java but due to difficulty testing they will be done separately.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.