hotspot/src/share/vm/oops/cpCache.cpp
changeset 24459 ebd373039673
parent 24424 2658d7834c6e
child 24926 5ea835dfafaa
--- a/hotspot/src/share/vm/oops/cpCache.cpp	Thu May 15 20:16:14 2014 -0700
+++ b/hotspot/src/share/vm/oops/cpCache.cpp	Fri May 16 15:05:44 2014 -0700
@@ -498,9 +498,10 @@
     // _f1 == NULL || !_f1->is_method() are OK here
     return true;
   }
-  // return false if _f1 refers to an old or an obsolete method
+  // return false if _f1 refers to a non-deleted old or obsolete method
   return (NOT_PRODUCT(_f1->is_valid() &&) _f1->is_method() &&
-          !((Method*)_f1)->is_old() && !((Method*)_f1)->is_obsolete());
+          (f1_as_method()->is_deleted() ||
+          (!f1_as_method()->is_old() && !f1_as_method()->is_obsolete())));
 }
 
 bool ConstantPoolCacheEntry::is_interesting_method_entry(Klass* k) {