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

Support enabling of transform events for recursive class loads

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 7
    • Fix Version/s: 10
    • Component/s: core-svc

      Description

      Currently if a java.lang.instrument.ClassFileTransformer provokes additional class loading in its transform() method, the additional classes loaded by the current thread do not have the transform() method called for them. Presumably this behavior was chosen due to bootstrapping issues caused by the ClassFileTransformer implementation being written in Java or similar. (Looking through the version history for JPLISAgent.c, it seems this behavior predates the first version of this file.) However, there are situations where it would be very useful to change this behavior; for example, if an agent chose to do some sort of user-level verification of the incoming bytecodes and where that verification provoked additional class loading. Currently the additional classes loaded in a process like this will not be properly transformed, which can lead to errors. There are workarounds for this limitation, but it would be useful to be able to at least disable the behavior on a per-ClassFileTransformer basis using the Instrumentation APIs.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kbr Kenneth Russell (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: