Review Request JDK-8173975: Lookup::in should not allow target class be primitive or array class
Mandy Chung
mandy.chung at oracle.com
Mon Oct 14 22:34:48 UTC 2019
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
More information about the core-libs-dev
mailing list