Delete ClassInjector api#18112
Conversation
SylvainJuge
left a comment
There was a problem hiding this comment.
Good job on removing so much complexity !
| "([Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;", | ||
| false); | ||
| if (isIndy) { | ||
| IndyBootstrap.invokeStatic( |
There was a problem hiding this comment.
With indy, this will invoke the ReflectionHelper.filterInterfaces method using invokedynamic. If I'm understanding this correctly we have to do this because the ReflectionInstrumentationModule is loaded in its own classloader and is thus not directly accessible to the instrumented class which is in the bootstrap CL. It could be worth adding some javadoc/comments to clarify this for future reference.
There was a problem hiding this comment.
Your understanding is correct. Added a comment. In boot loader we can't use exposedClassNames to make the helper class accessible. An alternative would be to use inline advice in this module.
Resolves #16975