8009531: Crash when redefining class with annotated method

Neglected to copy the annotations in clone_with_new_data when they were moved to ConstMethod.

Reviewed-by: acorn, sspitsyn, dcubed
This commit is contained in:
Coleen Phillimore 2013-03-27 08:19:50 -04:00
parent 087b089a1f
commit 878c7e4cd0
3 changed files with 25 additions and 0 deletions

View file

@ -1170,6 +1170,8 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
newm->set_stackmap_data(stackmap_data);
}
// copy annotations over to new method
newcm->copy_annotations_from(cm);
return newm;
}