RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class
forax at univ-mlv.fr
Fri Sep 2 15:25:26 UTC 2016
disallowing array classes as host classes seems unrelated and knowing that jdk 10 or 11 will certainly add default methods to arrays,
we will want to have anonymous classes with arrays as host class in order to acts as bridges/mixins.
----- Mail original -----
> De: "harold seigel" <harold.seigel at oracle.com>
> À: "Alan Bateman" <Alan.Bateman at oracle.com>, "Hotspot dev runtime" <hotspot-runtime-dev at openjdk.java.net>,
> core-libs-dev at openjdk.java.net
> Envoyé: Vendredi 2 Septembre 2016 17:03:34
> Objet: Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class
> Thanks Alan. I'll go ahead and make that change.
> On 9/2/2016 10:43 AM, Alan Bateman wrote:
>> On 02/09/2016 14:02, harold seigel wrote:
>>> 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:
>> 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