[jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class

Mandy Chung mchung at openjdk.java.net
Fri Jun 25 16:45:06 UTC 2021


On Fri, 25 Jun 2021 08:44:54 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> `Lookup::accessClass` should determine the accessibility of the element type.  An array class is accessible if and only if its element type is accessible.
>> 
>> This also fixes a spec bug to document `@throws NullPointerException` if the argument is null.
>> 
>> Please review the CSR:
>>     https://bugs.openjdk.java.net/browse/JDK-8269312
>
> test/jdk/java/lang/invoke/t8150782/TestFindClass.java line 42:
> 
>> 40: 
>> 41: import org.testng.annotations.*;
>> 42: import p.Foo;
> 
> maybe a stray import?

Yup. Will remove it.

-------------

PR: https://git.openjdk.java.net/jdk17/pull/137


More information about the core-libs-dev mailing list