mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8199781: Don't use naked == for comparing oops
Reviewed-by: coleenp, eosterlund, jrose
This commit is contained in:
parent
8b50176bdc
commit
b938ae51ce
36 changed files with 1484 additions and 1282 deletions
|
@ -201,7 +201,7 @@ class VerifyContainsOopClosure : public OopClosure {
|
|||
VerifyContainsOopClosure(oop target) : _target(target), _found(false) {}
|
||||
|
||||
void do_oop(oop* p) {
|
||||
if (p != NULL && *p == _target) {
|
||||
if (p != NULL && oopDesc::equals(RawAccess<>::oop_load(p), _target)) {
|
||||
_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ void ClassLoaderData::record_dependency(const Klass* k) {
|
|||
|
||||
// Just return if this dependency is to a class with the same or a parent
|
||||
// class_loader.
|
||||
if (from == to || java_lang_ClassLoader::isAncestor(from, to)) {
|
||||
if (oopDesc::equals(from, to) || java_lang_ClassLoader::isAncestor(from, to)) {
|
||||
return; // this class loader is in the parent list, no need to add it.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue