8160487: JVM should validate a module by checking for an instance of java.lang.reflect.Module

Correct the checking of an instance of java.lang.reflect.Module to validate a module

Reviewed-by: alanb, coleenp, redestad
This commit is contained in:
Lois Foltan 2016-07-28 09:57:49 -04:00
parent f47008ae10
commit 6066d30e17
4 changed files with 9 additions and 14 deletions

View file

@ -168,11 +168,8 @@ inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
return obj != NULL && is_subclass(obj->klass());
}
inline bool java_lang_reflect_Module::is_instance(oop obj) {
return obj != NULL && is_subclass(obj->klass());
return obj != NULL && obj->klass() == SystemDictionary::reflect_Module_klass();
}
inline int Backtrace::merge_bci_and_version(int bci, int version) {