JDK-7022100 : Method annotations are incorrectly set when redefining classes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: hs21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-02-24
  • Updated: 2019-08-16
  • Resolved: 2012-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Description
The following methods all set _methods_annotations:
void set_method_annotations_of(int idnum, typeArrayOop anno)
  { set_methods_annotations_of(idnum, anno, &_methods_annotations); }
void set_method_parameter_annotations_of(int idnum, typeArrayOop anno)
  { set_methods_annotations_of(idnum, anno, &_methods_annotations); }
void set_method_default_annotations_of(int idnum, typeArrayOop anno)
  { set_methods_annotations_of(idnum, anno, &_methods_annotations); }

the last two setters should use the annotations matching the setter name.

The corresponding getters:
typeArrayOop get_method_annotations_of(int idnum)
  { return get_method_annotations_from(idnum, _methods_annotations); }
typeArrayOop get_method_parameter_annotations_of(int idnum)
  { return get_method_annotations_from(idnum, _methods_parameter_annotations); }
typeArrayMDOop get_method_default_annotations_of(int idnum)
  { return get_method_annotations_from(idnum, _methods_default_annotations); }

The setters are only used by jvmtiRedefineClasses.cpp.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/26a08cbbf042
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/26a08cbbf042
03-02-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/26a08cbbf042
30-01-2012

EVALUATION Looks like a straight forward cut-n-paste error.
24-02-2011