8204970: Remaing object comparisons need to use oopDesc::equals()
Reviewed-by: eosterlund, zgu
This commit is contained in:
parent
86629a36f0
commit
ca473200b7
@ -74,7 +74,7 @@ private:
|
||||
ciMetadata* create_new_metadata(Metadata* o);
|
||||
|
||||
static bool is_equal(NonPermObject* p, oop key) {
|
||||
return p->object()->get_oop() == key;
|
||||
return oopDesc::equals(p->object()->get_oop(), key);
|
||||
}
|
||||
|
||||
NonPermObject* &find_non_perm(oop key);
|
||||
|
@ -307,7 +307,7 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
|
||||
|
||||
oop loader = java_lang_Module::loader(module_handle());
|
||||
// Make sure loader is not the jdk.internal.reflect.DelegatingClassLoader.
|
||||
if (loader != java_lang_ClassLoader::non_reflection_class_loader(loader)) {
|
||||
if (!oopDesc::equals(loader, java_lang_ClassLoader::non_reflection_class_loader(loader))) {
|
||||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
|
||||
"Class loader is an invalid delegating class loader");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user