aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot/.hg/patches/orig-meth-ids-revert-jdk8u152.patch
blob: fda92d02869bcd769a2c58952e9534829e3dc346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/src/share/vm/prims/jvmtiRedefineClasses2.cpp b/src/share/vm/prims/jvmtiRedefineClasses2.cpp
index d35406d..b41dfe9 100644
--- a/src/share/vm/prims/jvmtiRedefineClasses2.cpp
+++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp
@@ -784,8 +784,10 @@
         if (idnum_owner != NULL) {
           // There is already a method assigned this idnum -- switch them
           idnum_owner->set_method_idnum(new_num);
+          idnum_owner->set_orig_method_idnum(k_new_method->orig_method_idnum());
         }
         k_new_method->set_method_idnum(old_num);
+        k_new_method->set_orig_method_idnum(k_old_method->orig_method_idnum());
         RC_TRACE(0x00008000,
             ("swapping idnum of new and old method %d / %d!", new_num, old_num));
       }
@@ -816,9 +818,12 @@
       Method* idnum_owner = new_class->method_with_idnum(num);
       if (idnum_owner != NULL) {
         // There is already a method assigned this idnum -- switch them
+        // Take current and original idnum from the new_method
         idnum_owner->set_method_idnum(new_num);
+        idnum_owner->set_orig_method_idnum(k_new_method->orig_method_idnum());
       }
       k_new_method->set_method_idnum(num);
+      k_new_method->set_orig_method_idnum(num);
     }
     RC_TRACE(0x00008000, ("Method added: new: %s [%d], idnum %d",
                          k_new_method->name_and_sig_as_C_string(), ni, k_new_method->method_idnum()));