RFR findWither with access checks

Paul Sandoz paul.sandoz at oracle.com
Fri Jun 23 00:01:23 UTC 2017

> On 22 Jun 2017, at 16:51, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> Looks good.
> One question - does the lookup have to come necessarily from 'privateLookupIn' to have the isPrivate() bit set? What if the wither handle is used from a method of the VCC itself? In that case it should probably work - even if the lookup is obtained in the standard fashion (MethodHandles.lookup()) ?

Correct, i tweaked the test:

public void testWither() throws Throwable {
    testWither(MethodHandles.privateLookupIn(VT.boxClass(), LOOKUP));
    testWither(MethodHandles.privateLookupIn(VT.valueClass(), LOOKUP));

webrev updated in place.


> Thanks
> Maurizio
> On 23/06/17 00:41, Paul Sandoz wrote:
>> http://cr.openjdk.java.net/~psandoz/valhalla/findWither-access/webrev/ <http://cr.openjdk.java.net/~psandoz/valhalla/findWither-access/webrev/>
>> Updates findWither to grant access if the lookup class is VCC or DVT with private access.
>> Paul.

More information about the valhalla-dev mailing list