8285914: AppCDS crash when using shared archive with old class file

Reviewed-by: dholmes, iklam
This commit is contained in:
Calvin Cheung 2022-05-09 16:00:57 +00:00
parent fe6e0c0beb
commit 29ccb8fbb8
6 changed files with 226 additions and 9 deletions

View file

@ -474,6 +474,11 @@ private:
bool has_nest_member(JavaThread* current, InstanceKlass* k) const;
public:
// Call this only if you know that the nest host has been initialized.
InstanceKlass* nest_host_not_null() {
assert(_nest_host != NULL, "must be");
return _nest_host;
}
// Used to construct informative IllegalAccessError messages at a higher level,
// if there was an issue resolving or validating the nest host.
// Returns NULL if there was no error.