MethodHandle vamh = prepareForInvoker(MH_checkCallerClass);
Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc});
+ assert Boolean.TRUE.equals(ok) : ok;
What I meant is to convert the whole test (inside try-catch block) into
an assert.
+ UNSAFE.ensureClassInitialized(bcc);
Do people see any reason to force invoker class init? I'd prefer to see
it goes away.
Also, as a second thought, generateInvokerTemplate() looks clearer than
invokerTemplateGenerator().
Something like the following:
http://cr.openjdk.java.net/~vlivanov/8149574/webrev.00/
Additional cleanup: checkCallerClass() should return injected invoker
class when invoked using a method handle, so no need in 2nd argument.
Best regards,
Vladimir Ivanov
On 5/13/16 11:56 AM, [email protected] wrote:
Thanks Paul!
Please review http://cr.openjdk.java.net/~srastogi/8149574/webrev10.0/
Regards,
Shilpi
On 5/13/2016 2:09 PM, Paul Sandoz wrote:
assert Boolean.TRUE.equals(ok) : ok;