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

ClassFileTransformer reentrancy and exception handling not specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 5.0, 24
    • core-svc

      ClassFileTransformer does not specify what happens when code executing in the transform method triggers class loading. Long standing behavior (since JDK 5) is that the ClassFileTransformer is not called if a transform is in progress.

      Additionally, ClassFileTransformer does not specify what happens if a transform method completes abruptly with an error or exception (a LinkageError due to recursive class loading for example). Long standing behavior is to silently swallow the exception, and "keep on trucking" by invoking the next transformer in the pipeline. This needs to be specified and potentially re-examined too as it would be a lot better to abort the pipeline and propagate an error/exception when initiated by a retransformClasses or redefineClasses (not much can be done for the initial class load). The compatibility impact of changing this behavior would of course need to examined to see how feasible it is.

            Unassigned Unassigned
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: