RFE JDK-8187698: [Nestmates][Testbug] Test java/lang/invoke/AccessControlTest.java needs updating for nestmates
mandy chung
mandy.chung at oracle.com
Thu Feb 22 02:37:50 UTC 2018
On 2/21/18 5:33 PM, David Holmes wrote:
> Thanks Mandy!
>
> You also need to remove the test from ProblemList.txt.
>
I later uploaded the webrev with ProblemList.txt fixed (probably after
you reviewed it). Anyway I have it covered.
Mandy
> David
>
> On 22/02/2018 11:30 AM, mandy chung wrote:
>>
>>
>> On 2/21/18 5:25 PM, David Holmes wrote:
>>> Hi Mandy,
>>>
>>> Thanks for taking this one!
>>>
>>> On 22/02/2018 10:55 AM, mandy chung wrote:
>>>> http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8187698/webrev.00/
>>>>
>>>> A simple test fix. Update AccessControlTest test how it determines
>>>> whether
>>>> a test case should have access to handle the nestmates case when
>>>> accessing
>>>> a private member.
>>>
>>> + boolean samePackageMember = sameClass || sameTopLevel;
>>>
>>> I don't understand this change. If c1==c2 then sameTopLevel is also
>>> true. So it is always the case that samePackageMember ==
>>> sameTopLevel and so the change has no affect.
>>
>> This is not needed. I tried to mirror
>> VerifyAccess::isSamePackageMember. I will take it out.
>>>
>>> ! // allow private lookup on nestmates. Otherwise,
>>> privacy is strictly enforced
>>> ! if (c1 != c2 && ((m2 & PRIVATE) == 0 ||
>>> c1.getNestHost() != c2.getNestHost())) {
>>> ! m1 &= ~PRIVATE;
>>> ! }
>>>
>>> Ah! I tried this but didn't check the access was actually private!
>>> No wonder it failed. :)
>>>
>>> This can be simplified using !c1.isNestmateOf(c2)
>>>
>>
>> OK. I will change that before I push.
>>
>> thanks
>> Mandy
More information about the valhalla-dev
mailing list