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

[JVMCI] rationalize relationship between getCodeSize and getCode in ResolvedJavaMethod

    XMLWordPrintable

Details

    • b24

    Backports

      Description

        When ResolvedJavaMethod.getCodeSize returns a value > 0, it is currently possible for ResolvedJavaMethod.getCode to return null (i.e. when the declaring class is not linked) which has confused many JVMCI API users and led to subtle bugs. Experience has shown that a value > 0 means callers expect getCode to not return null. It's about time to conform to this reasonable expectation. If the declaring class is not linked, getCodeSize should return -1.

        Attachments

          Issue Links

            Activity

              People

                dnsimon Douglas Simon
                dnsimon Douglas Simon
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: