-
-
Notifications
You must be signed in to change notification settings - Fork 378
Do not generate visibility bridge for package-private default methods (fixes #1118) #1366
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
@sgerke-1L thanks for your analysis! By comparing the Javadocs for the two methods I concluded that the existing
@Raibaz can we ask you to approve the workflow run to get full test coverage, thanks. |
Sure, and thanks a lot to both of you for the in-depth analysis! |
After revisiting raphw/byte-buddy#1795 I changed my mind. True, the Byte Buddy Javadoc does warn against the use of I'd be happy to see this land and released soon. |
Thanks for your support @marcelstoer. I still can't judge the full consequences of using |
I definitely agree with @sgerke-1L. |
Btw, is it possible to run the android tests as well or would that have to be done locally? |
The instrumented tests for api level 30 have been run, I see that as the first check in the list. |
Minimal reproducer for issue #1118 with fix.
The root problem is that the JVM doesn't generate a visibility bridge for package-private default methods, but byte-buddy does. This was discussed in raphw/byte-buddy#1795.
It might be that we can use
decorate
instead ofredefine
to side-step the problem, but I'm not experienced enough with mockk to judge if this can work.The previous approach of not generating the bridge methods by deselecting them with a custom visibility bridge strategy can be found in the commit history and might be an alternative if
decorate
is not viable.