• Andy Wilkinson's avatar
    Exclude Java agents from class loader created by PropertiesLauncher · 681a866c
    Andy Wilkinson authored
    PropertiesLauncher creates a ClassLoader that is used by the Launcher
    to load an application’s classes. During the creation of this
    ClassLoader URLs from its ClassLoader. This resulted resulting in Java
    agents that are added to the system class loader via the -javaagent
    launch option being available on both the system class loader and the
    created class loader. Java agents are intended to always be loaded by
    the system class loader. Making them available on another class loader
    breaks this model.
    
    This is the same problem that was in ExecutableArchiveLauncher and
    that was fixed in ee08667e (see gh-863).
    
    This commit updates PropertiesLauncher so that it skips the URLs of
    any Java agents (found by examining the JVM’s input arguments) when
    copying URLs over to the new ClassLoader, thereby ensuring that Java
    agents are only ever loaded by the system class loader.
    
    Closes gh-4911
    681a866c
Name
Last commit
Last update
..
spring-boot-configuration-processor Loading commit data...
spring-boot-dependency-tools Loading commit data...
spring-boot-gradle-plugin Loading commit data...
spring-boot-loader Loading commit data...
spring-boot-loader-tools Loading commit data...
spring-boot-maven-plugin Loading commit data...
pom.xml Loading commit data...