diff --git a/src/hotspot/share/runtime/handles.hpp b/src/hotspot/share/runtime/handles.hpp index beee59b..85285d5 100644 --- a/src/hotspot/share/runtime/handles.hpp +++ b/src/hotspot/share/runtime/handles.hpp @@ -77,8 +77,9 @@ class Handle { // General access oop operator () () const { return obj(); } oop operator -> () const { return non_null_obj(); } - bool operator == (oop o) const { return obj() == o; } - bool operator == (const Handle& h) const { return obj() == h.obj(); } + + bool operator == (oop o) const { return oopDesc::equals(obj(), o); } + bool operator == (const Handle& h) const { return oopDesc::equals(obj(), h.obj()); } // Null checks bool is_null() const { return _handle == NULL; }