RFR: 8249080 - Reduce MemberName class dependency on MethodHandles
Mandy Chung
mandy.chung at oracle.com
Wed Jul 8 18:39:12 UTC 2020
On 7/8/20 11:21 AM, Bob Vandette wrote:
>
>> On Jul 8, 2020, at 1:01 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
>>
>>
>>
>> On 7/8/20 9:40 AM, Bob Vandette wrote:
>>> Should I add an assert or just let the NPE happen?
>> What about Objects.requireNonNull(m);
> Thanks.
>
> Here’s the updated webrev:
>
> https://cr.openjdk.java.net/~bobv/8249080/webrev.02/
>
>
line 3580-8383 step 2b should be removed completely.
checkSecurityManager(Class<?> refc, MemberName m) performs step 1, 2a
and 3 [1] whereas checkSecurityManager(Class<?> refc) performs step 1
and 2b only.
It'd be helpful to make it clear in the comment the steps that it performs.
Nit: line 3566: probably better to add Objects.requireNonNull(refc) to
avoid misinterpreting that refc can be null.
thanks
Mandy
[1]
https://download.java.net/java/early_access/jdk15/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html#secmgr
More information about the core-libs-dev
mailing list