mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8204970: Remaing object comparisons need to use oopDesc::equals()
Reviewed-by: eosterlund, zgu
This commit is contained in:
parent
86629a36f0
commit
ca473200b7
2 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ private:
|
||||||
ciMetadata* create_new_metadata(Metadata* o);
|
ciMetadata* create_new_metadata(Metadata* o);
|
||||||
|
|
||||||
static bool is_equal(NonPermObject* p, oop key) {
|
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);
|
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());
|
oop loader = java_lang_Module::loader(module_handle());
|
||||||
// Make sure loader is not the jdk.internal.reflect.DelegatingClassLoader.
|
// 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(),
|
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
|
||||||
"Class loader is an invalid delegating class loader");
|
"Class loader is an invalid delegating class loader");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue