[Nestmates] RFR Lookup.defineClass nest-host update

David Holmes david.holmes at oracle.com
Mon Nov 5 07:03:12 UTC 2018


Testing showed that the internal use of Class.getNestHost inside 
Lookup.defineClass was not suitable as invalidly defined 
nest-hosts/members resulted in an inappropriate nest-host being passed 
into the the VM to set_nest_host (a class becomes it's own nest-host if 
there are any validation errors). set_nest_host needs a valid nest-host 
else we'll hit assertion failures.

The solution was to pass the lookupClass through to the VM and have 
jvm_lookup_define_class do a direct InstanceKlass::nest_host() lookup 
that will throw exceptions if there are validation issues.

I also adjusted the logging statement to account for the changes and 
updated what it reported.

I also adjusted the exception message in JVM_GetNestMembers as it didn't 
report what class getNestmembers had been called on.


More information about the valhalla-dev mailing list