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

Put anonymous classes in unnamed package into host class's package.  Throw exception if host class's package differs from anonymous class.

Reviewed-by: coleenp, acorn
This commit is contained in:
Harold Seigel 2016-09-07 07:19:48 -04:00
parent c271d83599
commit e8e6415b7a
14 changed files with 416 additions and 31 deletions

View file

@ -1027,7 +1027,7 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
Handle class_loader,
Handle protection_domain,
ClassFileStream* st,
const Klass* host_klass,
const InstanceKlass* host_klass,
GrowableArray<Handle>* cp_patches,
TRAPS) {