• Andy Wilkinson's avatar
    Use fast exceptions in hasMoreElements in LaunchedURLClassLoader · d241171f
    Andy Wilkinson authored
    When nested jars are being used, hasMoreElements requires opening a
    connection for an entry in every nested jar. If that entry doesn't
    exist, a FileNotFoundException is thrown to indicate that a particular
    jar doesn't contain the requested entry. This exception is used to
    indicate the lack of an entry and is then swallowed, i.e. its stack
    trace is of no importance. This means that the performance of
    hasMoreElements can be improved by switching on fast exceptions while
    it's being called. When fast exceptions are switched on a general
    purpose pre-initialized FileNotFoundException is thrown rather than
    creating a new FileNotFoundException instance each time.
    
    In certain situations, the use of fast exceptions as described above
    can improve performance fairly significantly. The JRE's default SAAJ
    implementation uses META-INF/services-based discovery for _every_
    request that's handled by Spring Web Services. Each discovery attempt
    results in hasMoreElements being called making its performance
    critical to throughput.
    
    See gh-3640
    d241171f
Name
Last commit
Last update
docs Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator 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-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-tools Loading commit data...
spring-boot-versions Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
pom.xml Loading commit data...