RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

harold seigel harold.seigel at oracle.com
Fri Sep 2 15:03:34 UTC 2016


Thanks Alan.  I'll go ahead and make that change.

Harold


On 9/2/2016 10:43 AM, Alan Bateman wrote:
>
>
> On 02/09/2016 14:02, harold seigel wrote:
>> Hi,
>>
>> Please review this new fix for JDK-8058575.  This fix requires that a 
>> VM anonymous class be in either the same package as its host class or 
>> be in the unnamed package.  If the anonymous class is in the unnamed 
>> package then this fix puts it into its host class's package, ensuring 
>> that the anonymous class and its host class are in the same module.  
>> This fix also throws an IllegalArgumentException if the host class is 
>> an array class.
>>
>> Additionally, the type of field ClassFileParser::_host_klass was 
>> changed to InstanceKlass* and some comments were cleaned up.
>>
>> JBS bug: https://bugs.openjdk.java.net/browse/JDK-8058575
>>
>> Open webrevs:
>>
>>    http://cr.openjdk.java.net/~hseigel/bug_8058575.jdk.3/
> In GetModuleTest then one clean-up is to change it to use 
> hostClass.getPackageName() and remove packageName(String).
>
> -Alan



More information about the core-libs-dev mailing list