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

Support throwing exceptions out of a java.lang.instrument ClassFileTransformer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 10
    • 7
    • core-svc

      Currently if an exception is thrown out of a java.lang.instrument.ClassFileTransformer's transform method, the instrumentation agent considers this a bug in the transformer and for robustness purposes simply passes the original bytecodes to the virtual machine for definition. There are situations where it would be very useful to be able to cause that exception (such as a VerifyError, ClassFormatError, etc.) to be propagated to the caller of ClassLoader.defineClass(). Obviously the default behavior of the instrumentation agent can not be changed, but perhaps the Instrumentation APIs can be extended so that for a particular ClassFileTransformer, it can be selected whether to propagate exceptions out to the caller.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: