-
Enhancement
-
Resolution: Won't Fix
-
P3
-
7
-
generic
-
generic
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.