MergedAnnotation does not use ClassLoader for method or field#36606
Closed
nameearly wants to merge 1 commit intospring-projects:mainfrom
Closed
MergedAnnotation does not use ClassLoader for method or field#36606nameearly wants to merge 1 commit intospring-projects:mainfrom
MergedAnnotation does not use ClassLoader for method or field#36606nameearly wants to merge 1 commit intospring-projects:mainfrom
Conversation
DhruvTheDev1
reviewed
Apr 7, 2026
Contributor
DhruvTheDev1
left a comment
There was a problem hiding this comment.
Hi, the logic seems to be correct as the missing return was definitely causing the classLoader to be lost. Maybe a quick unit test to verify the member source now correctly returns its loader instead of null.
MergedAnnotation does not use ClassLoader for method or field
Member
|
Thanks for bringing this to our attention! 👍 Since the commit had not been signed off and also did not include a test, I went ahead and completed this myself in f3b6c22. |
sbrannen
added a commit
that referenced
this pull request
Apr 7, 2026
Prior to this commit, the `return` keyword was missing in TypeMappedAnnotation's getClassLoader() implementation, which prevented the ClassLoader of the Member (Method or Field) from being used. This commit fixes that by adding the missing `return` keyword and adds a test using a custom ClassLoader to verify the correct behavior. Closes gh-36606 (cherry picked from commit f3b6c22)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I checked carefully, something goes wrong without
return.