Review Request JDK-8173975: Lookup::in should not allow target class be primitive or array class
Alan Bateman
Alan.Bateman at oracle.com
Tue Oct 15 09:26:20 UTC 2019
On 14/10/2019 23:34, Mandy Chung wrote:
> 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/
This change looks good and I've added myself as Reviewer to the CSR.
-Alan
More information about the core-libs-dev
mailing list