• Andy Wilkinson's avatar
    Fall back to JVM's class path when TCCL is not a URLClassLoader · ce77f48c
    Andy Wilkinson authored
    Previously, DevTools assumed that the TCCL was a URLClassLoader
    when trying to determine the URLs that it should examine to determine
    the locations that should be watched for triggering a restart. This
    fails on Java 9 as the TCCL is not a URLClassLoader.
    
    This commit updates the logic that determines the changeable URLs to
    fall back to examining the JVM's class path when the TCCL is not a
    URLClassLoader, typically because the application is running on Java
    9. This fall back isn't a direct equivalent of the behaviour on Java 8
    as the class path of the TCCL and the class path with which the JVM
    was launched may not be the same. However, I consider the fix to be
    reasonable for two reasons:
    
    1. In reality, the class path of the TCCL and the class path with
       which the JVM was launched are the same.
    2. There appears to be now to get the URLs on the class path of the
       TCCL on Java 9. There is a URLClassPath field, however Java 9's
       access restrictions prevent us from using it even if we resort to
       reflection.
    
    Closes gh-10454
    ce77f48c
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-autoconfigure Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...