Commit Graph

385 Commits (923393d5af80077c558b5b1bdc5cc882a12334a0)

Author SHA1 Message Date
Andy Wilkinson 31b0e81765 Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
8 years ago
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
8 years ago
Stephane Nicoll 661fd848eb Merge branch '1.5.x' 8 years ago
Stephane Nicoll 505e7f75ea Polish contribution
Closes gh-8089
8 years ago
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
8 years ago
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
8 years ago
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
8 years ago
Andy Wilkinson 2b75570680 Fix dead code warning in CentralDirectoryParserTests 8 years ago
Phillip Webb f92f019418 Don't mock package private class
See gh-7770
8 years ago
Phillip Webb 77f9bb09ca Further Polish Mockito 2 support
See gh-7770
8 years ago
Phillip Webb f8c7890a45 Merge branch '1.5.x' 8 years ago
dreis cee576b8b2 Reduce memory footprint of AsciiBytes.hashCode
Update `AsciiBytes.hashCode(int hash, String string)` so that it no
longer copies the backing array of the string.

Closes gh-7851
8 years ago
Phillip Webb 53f1df86a2 Merge branch '1.5.x' 8 years ago
Phillip Webb aacf5d660f Update copyright year for changed files 8 years ago
Phillip Webb 6e02fe59f7 Merge branch '1.5.x' 8 years ago
Johnny Lim e12b4a944f Polish 8 years ago
Phillip Webb 1f417997f3 Merge branch '1.5.x' 8 years ago
Phillip Webb 6121208cbb Polish formatting 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bd74c3d327 Polish formatting 8 years ago
Andy Wilkinson 6eaa8d7c56 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 53287eadf6 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 2d8344d46d Ensure that JarLauncher doesn't cause root jar to be on class path twice
Closes gh-7595
8 years ago
Stephane Nicoll bd2415463c Merge branch '1.5.x' 8 years ago
Oscar Utbult 3a7969b8bb Remove redundant StringBuilder
Closes gh-7538
8 years ago
Stephane Nicoll e7275b62dc Merge branch '1.5.x' 8 years ago
Oscar Utbult fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
8 years ago
Stephane Nicoll 9c374e7755 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 06e44c71ec Merge branch '1.4.x' into 1.5.x 8 years ago
Oscar Utbult 88b83a909c Remove redundant toString() invocation
Closes gh-7510
8 years ago
Phillip Webb b4c3f4f504 Merge branch '1.5.x' 8 years ago
Phillip Webb 5ed00b3501 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 357d072a60 Polish 8 years ago
Andy Wilkinson c714880001 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 655ab9871b Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5e79657d4b Treat URLs for same file in nested archive and from jar root as equal
Consider the following two URLs:

jar:file:/test.jar!/BOOT-INF/classes!/foo.txt
jar:file:/test.jar!/BOOT-INF/classes/foo.txt

They both reference the same foo.txt file in the BOOT-INF/classes
directory of test.jar, however the first URL does so via the
nested BOOT-INF/classes archive. Previously, this difference in the
URLs would lead to PathMatchingResourcePatternResolver returning two
resources for foo.txt when asked to find all resources matching the
pattern classpath*:/**/*.txt.

This commit updates our Handler that is used for jar: URLs to consider
the two URLs above to be equivalent such that url1 is equal to url2
and the two urls will produce the same hash code.

Closes gh-7449
8 years ago
Phillip Webb cb7c0b5031 Merge branch '1.5.x' 8 years ago
Johnny Lim 8038882d46 Polish
Closes gh-7403
8 years ago
Spring Buildmaster e712a9ba8c Next Development Version 8 years ago
Andy Wilkinson 3a2d9e31ff Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 808185ab4e Make LaunchedURLClassLoader Java 6 compatible again
Closes gh-7334
8 years ago
Andy Wilkinson 78fcb311c9 Merge branch '1.5.x' 8 years ago
Andy Wilkinson e576225959 Merge branch '1.4.x' into 1.5.x 8 years ago
dreis 7a797909ae Reinstate LaunchedURLClassLoader's registration as parallel capable
Closes gh-7334
8 years ago
Phillip Webb 98a3ae9ac4 Merge branch '1.5.x' 8 years ago
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Andy Wilkinson f2c7e22731 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 6b3eede59f Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 6a68c8f7e0 Restore Handler logic that was changed during its merge
This commit restores the logic in Handler that was changed when
d20ac56a was merged, while leaving the structural improvements intact.

In addition to a couple of changes where a typo meant the wrong
variable was being referenced, some logic branches now return false
rather than called super. This realigns our Handler's behaviour with
that of the JDK's.

Some more tests have also been added to try to catch the problems that
were introduced during the merge.

Closes gh-7021
8 years ago