8204970: Remaing object comparisons need to use oopDesc::equals()
Reviewed-by: eosterlund, zgu
--- a/src/hotspot/share/ci/ciObjectFactory.hpp Wed Jul 25 15:38:37 2018 -0400
+++ b/src/hotspot/share/ci/ciObjectFactory.hpp Wed Jul 25 21:47:40 2018 +0200
@@ -74,7 +74,7 @@
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);
--- a/src/hotspot/share/classfile/modules.cpp Wed Jul 25 15:38:37 2018 -0400
+++ b/src/hotspot/share/classfile/modules.cpp Wed Jul 25 21:47:40 2018 +0200
@@ -307,7 +307,7 @@
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");
}