--- old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java 2020-03-31 19:13:23.000000000 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java 2020-03-31 19:13:23.000000000 -0700 @@ -51,6 +51,7 @@ * System.out.printf(">>> %s\n", iii.foo(44)); * }} */ + final MethodHandles.Lookup caller; // The caller's lookup context final Class targetClass; // The class calling the meta-factory via invokedynamic "class X" final MethodType invokedType; // The type of the invoked method "(CC)II" final Class samBase; // The type of the returned instance "interface JJ" @@ -120,6 +121,7 @@ "Invalid caller: %s", caller.lookupClass().getName())); } + this.caller = caller; this.targetClass = caller.lookupClass(); this.invokedType = invokedType;