The current Configuration (AgentConfig) is an argument of the agent command line. This configuration is propagated to the locations where it is needed, e.g. to the static filed SnapshotManager.MANAGER.
Generating Tests for Spring Applications made obvious that modern applications use their own byte code modification and their own class loaders. Consequently there are situations where SnapshotManager.MANAGER is null. This could be avoided if each class loading of SnapshotManager also initializes MANAGER and this makes it necessary to have a convention where to load the configuration from.
So this issue could be solved by:
Load the configuration from a ServiceLoader
Remove the configuration from the command line arguments
The current Configuration (
AgentConfig
) is an argument of the agent command line. This configuration is propagated to the locations where it is needed, e.g. to the static filedSnapshotManager.MANAGER
.Generating Tests for Spring Applications made obvious that modern applications use their own byte code modification and their own class loaders. Consequently there are situations where
SnapshotManager.MANAGER
is null. This could be avoided if each class loading ofSnapshotManager
also initializesMANAGER
and this makes it necessary to have a convention where to load the configuration from.So this issue could be solved by: