spring-boot/spring-boot-tools
Andy Wilkinson cdcc3d2f28 Ensure getResources("") includes nested root URLs
Previously, if Boot's JarURLConnection pointed to the root of a nested
entry, e.g. /BOOT-INF/classes, a call to getInputStream() would throw
an IOException. This behavior is reasonable for a URL that points
to the root of a normal jar as the jar itself is on the class path
anyway. However, for a nested jar it meant that a call to
ClassLoader.getResources("") would not include URLs for any nested
jars and directories (/BOOT-INF/classes and jars in /BOOT-INF/lib).
This is due to some logic in URLClassPath.Loader.findResource that
verifies a URL by opening a connection and calling getInputStream().

The result of missing URLs for the root of nested jars and directories
is that classpath scanning that scans from the root (not a good idea
for performance reasons, but something that we should support) would
not find entries in /BOOT-INF/classes or in jars in /BOOT-INF/lib.

This commit updates our JarURLConnection so that it no longer throws
an IOException when asked for an InputStream for the root of a nested
entry (directory or jar).

Fixes gh-7003
2016-10-31 12:06:35 -07:00
..
spring-boot-antlib Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
spring-boot-configuration-metadata Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
spring-boot-configuration-processor Formatting 2016-10-31 11:41:45 -07:00
spring-boot-gradle-plugin Deprecate support for Gradle 2.7 and earlier 2016-10-19 16:50:35 +01:00
spring-boot-loader Ensure getResources("") includes nested root URLs 2016-10-31 12:06:35 -07:00
spring-boot-loader-tools Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
spring-boot-maven-plugin Polish 2016-09-28 16:45:19 +02:00
pom.xml Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00