--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu Oct 03 12:39:58 2013 +0400
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu Oct 03 18:53:27 2013 -0400
@@ -2931,7 +2931,8 @@
old_method->set_is_obsolete();
obsolete_count++;
- // obsolete methods need a unique idnum
+ // obsolete methods need a unique idnum so they become new entries in
+ // the jmethodID cache in InstanceKlass
u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
if (num != ConstMethod::UNSET_IDNUM) {
old_method->set_method_idnum(num);