MethodHandles::lookup produces a Lookup object on the caller class. The original intention for a Lookup object whose lookup class is always a non-array and non-primitive class.

MethodHandles::privateLookupIn and Lookup::in are the two other ways that can produce a new Lookup object and they should disallow the new lookup class be a primitive or array class.

This patch proposes to make Lookup::in consistent with MethodHandles::privateLookupIn to throw IAE if the target class is an array type or primitive type.


CSR: https://bugs.openjdk.java.net/browse/JDK-8232227
webrev:
http://cr.openjdk.java.net/~mchung/jdk14/8173975/webrev.00/

thanks
Mandy

Reply via email to