Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210510

JCMD's dependency on hardcoded Constant Pool indexes should be eliminated

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 12
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      11

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hseigel Harold Seigel
                Reporter:
                hseigel Harold Seigel
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: