8276184: Exclude lambda proxy class from the CDS archive if its caller class is excluded

Reviewed-by: iklam, dholmes
This commit is contained in:
Calvin Cheung 2021-11-16 02:34:36 +00:00
parent a59c9b2ac2
commit bd92674be5
14 changed files with 511 additions and 68 deletions

View file

@ -2598,6 +2598,11 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
// retrieved during dump time.
// Verification of archived old classes will be performed during run time.
bool InstanceKlass::can_be_verified_at_dumptime() const {
if (MetaspaceShared::is_in_shared_metaspace(this)) {
// This is a class that was dumped into the base archive, so we know
// it was verified at dump time.
return true;
}
if (major_version() < 50 /*JAVA_6_VERSION*/) {
return false;
}