JDK-8210510 : JCMD's dependency on hardcoded Constant Pool indexes should be eliminated
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-09-07
  • Updated: 2022-01-04
  • Resolved: 2022-01-04
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Hotspot file reflectionAccessorImplKlassHelper.cpp, used by jcmd to inspect  reflection generated classes, uses hard-coded constant pool indices to find information in these classes. For example, for reflection generated classes that are not SerializationConstructorAccessors, it expects the method name and signature to be in constant pool indexes 7 and 8. 

This dependency on hard-coded constant pool indices is fragile and can easily be broken.  The implementation of reflectionAccessorImplKlassHelper.cpp should be changed to something less fragile.
Comments
JDK-8272065 will remove this code and thus take care of this issue too.
04-11-2021

This is for 'jcmd' so I would expect this bug to land in core-svc/tools instead of hotspot/runtime.
11-09-2018