-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Cannot modify visibility of private method? #1728
Comments
Have a look at |
hmm...so at runtime, once adjusted, i can see that the modifier has changed, but it still doesn't do quite what i wanted, so i guess i'll ask another question: is it possible to change a method from |
That should be possible, yes. This does however assume that both methods have the same signature. What are you observing? |
I can see with reflection that the modifier is changed, but the calling methods just invoke the "previously |
I assume that the method is already linked. What happens when you
retransform those classes without any changes?
Christopher Ng ***@***.***> schrieb am So., 24. Nov. 2024,
11:58:
… I can see with reflection that the modifier is changed, but the calling
methods just invoke the "previously private but now protected" method
directly and ignore the overriding methods in the sub-classes.
—
Reply to this email directly, view it on GitHub
<#1728 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCIA4HLTIHNZZQFVKDGPWL2CGWNTAVCNFSM6AAAAABSJJVQ3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVHEZTONJYGU>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
hum, i tried recreating in an isolated test case and haven't been able to, so perhaps i've got some mismatch in the arguments or something somewhere. when you say already linked what do you mean? the classes are already loaded somehow? or? |
For example: if a class path scanner looks for classes, this might trigger their loading. |
Is the following not supposed to work (in an
AgentBuilder
)?It's a bit hard to follow but when debugging it is applied to the transformed
MethodDescriptor
but this is then added to aPrepared.Entry
which has its ownvisibility
field. Thevisibility
field gets its value from the originalmethodDescriptor
and ignores modifiers on the transformedMethodDescriptor
.The text was updated successfully, but these errors were encountered: