On 14/03/2025 12:10, Simone Bordet wrote:
:
With some archeology, I found:
https://urldefense.com/v3/__https://bugs.eclipse.org/bugs/show_bug.cgi?id=347110__;!!ACWV5N9M2RV99hQ!IW-lZcO8m0GajZDPc4BK-QlJTTyR0a8NZNZT4IFVuTZWTd4j0sJZ0MThsyXFb3W1ez6iScbbkrxHxFmx3lbHGnyQ$
   :)

TLDR: Spring had (has?) a mechanism to instrument loaded class, I
assume for dependency injection.
The Spring agent requires custom class loaders to have an
`addTransformer(ClassFileTransformer)` method, hence the dependency of
Jetty's WebAppClassLoader to java.instrument.

Okay, so I think this more about ClassFileTransformer being a generally useful interface and WebAppClassLoader uses it for users that wants to instrument at ClassLoader load class time. So Java agents aren't in the picture, it's just one of the interfaces from j.l.instrument is being used and so this module needs to be the boot layer.

-Alan

Reply via email to