Class LookupExposer
- java.lang.Object
-
- co.elastic.apm.agent.bci.classloading.LookupExposer
-
public class LookupExposer extends java.lang.ObjectThis class is injected into everyIndyPluginClassLoaderinIndyBootstrap.bootstrap(java.lang.invoke.MethodHandles.Lookup, java.lang.String, java.lang.invoke.MethodType, java.lang.Object...)so that the bootstrap can use aMethodHandles.Lookupwith a lookup class from within theIndyPluginClassLoader, instead of callingMethodHandles.lookup()which uses the caller class as the lookup class.This circumvents a nasty JVM bug that's described here. The error is reproduced in
MethodHandleLookupTest
-
-
Constructor Summary
Constructors Constructor Description LookupExposer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.invoke.MethodHandles.LookupgetLookup()
-