On 16/10/2017 14:55, Robbin Ehn wrote:
There is actually an issue, we start all transformation with 'on' disk
version.
If the agent that did the addition of a public method e.g.
exits(removeTransformer) we can never re-transform it, instead we get:
"error method delete"
It have been suggested that we should use 'first published' class
version as a baseline (the version after CFLH), but would break
current agents (I assume).
:
Is it a bug or work as intended? (or a bug we can't fix)
If all agents (or JVM TI environments) are retransformation capable then
retransformClasses should send the initial class file bytes (or the "on
disk" version as you termed it) to the CFLH of the first agent. If a
retransformation capable agent adds a method in the initial load then it
should add it again when called to retransform the class.
On the other hand, if there are retransformation incapable agents in
picture then the class file bytes sent to the CFLH of the first
retransformation capable agent will be the class bytes from the output
from the retransformation incapable agents. So if retransformation
incapable agent adds a method in the initial load then that method will
exist in the class bytes that the retransformation capable agents see
when they retransform.
-Alan